Giter Club home page Giter Club logo

node-mbed-dtls's People

Contributors

brycekahle avatar bu5hm4nn avatar jspark311 avatar therudo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-mbed-dtls's Issues

Expose `mbedtls_ssl_cookie_ctx` callbacks to node.js

Refer to the section "Server-side only: Cookies for client verification" in this document https://tls.mbed.org/kb/how-to/dtls-tutorial.

We need the two callbacks mentioned mbedtls_ssl_cookie_write_t and mbedtls_ssl_cookie_check_t to be optionally exposed to node.js so that our server backend can handle them.

Make registering these optional, so if the user does not decide to use them the current use of the default handlers is preserved.

Write an example server and client that show how to test and use these callbacks by persisting a connection cookie across multiple client connects and add the example to the example/test directory.

Expose certificate verification status to node.js

When the DTLS connection is negotiated, mbedtls will attempt to verify the certificate. Depending on the setting, the connection will be refused when the certificate fails or a warning will be issued and the connection established anyways.

To support these two scenarios we need to

  1. Expose the verification setting to node js. Specifying this setting should be made mandatory in the API. ( MBEDTLS_SSL_VERIFY_NONE, MBEDTLS_SSL_VERIFY_OPTIONAL and MBEDTLS_SSL_VERIFY_REQUIRED)

  2. Expose an optional callback that can be registered from nodejs for the server to be notified about whether verification has succeeded when set to MBEDTLS_SSL_VERIFY_OPTIONAL.

To verify that the setting works, create test/example programs and associated Keys and Certificates that will demonstrate

  1. Handshake with only keys and MBEDTLS_SSL_VERIFY_NONE.

  2. With MBEDTLS_SSL_VERIFY_OPTIONAL
    a. Handshake with successful verification reported by the callback.
    b. Handshake with failed verification reported by the callback.

  3. With MBEDTLS_SSL_VERIFY_REQUIRED
    a. Successful verification
    b. failed verification

Expose available cipher configuration to node.js (for server)

The RFC standards specify a long list of cipher-suites that can be used for DTLS communication.

Expose an optional setting to node-js that can configure which cipher-suites a server will accept. Validate them against the use of PSK and Key authentication. If PSK callback is registered then require at least one PSK-capable ciphersuite to be enabled. If a server key is specified, then require at least one key-capable ciphersuite to be enabled.

Create node-js user friendly defines for the specification of the ciphers. See here for DTLS ciphers https://tools.ietf.org/html/rfc4492#section-6.

Create examples demonstrating at least

  1. A PSK configuration where
    a. the ciphersuite requirements are ok
    b. no ciphersuite suitable for PSK is set resulting in a node error exception.

  2. A key configuration where
    a. a the ciphersuit requirements are ok
    b. no ciphersuite suitable for key exchange is selected resulting in a node error exception.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.