Giter Club home page Giter Club logo

mbed-tls-sockets's Introduction

mbed TLS C++ Socket API

The mbed TLS C++ Socket API provides an interface to mbed TLS that looks like the mbed C++ Socket API. In particular, it is event-based, and the classes it defines inherit from the Socket class.

It is currently in beta stage, only intended for evaluation.

The following classes (all inheriting from the Socket class in the sockets module) are provided:

  1. TLSStream for TLS clients
  2. Upcoming: DTLS clients
  3. Upcoming depending on demand: TLS and DTLS servers

The remaining sections of this document provide guidance on using those classes.

TLSStream

The TLSStream class is intended for TLS clients. It inherits from TCPStream and is almost a drop-in replacement for it. The only difference is the additional method setup() that must be called between constructing the object and calling connect(). It expects a pointer to a mbedtls_ssl_config structure that you need to allocate and prepare using the various mbedtls_ssl_conf_xxx() functions. This structure can be shared between many TLSStream objects.

The main things you need to set up in the SSL/TLS configuration are:

  1. A cryptographically secure source of (pseudo-)random numbers. In the future a default source might be provided and set up automatically, but for now each application has to to it.
  2. A (list of) trusted root(s) for certificate-based authentication. Here, no sensible default can be defined, so it will always be up to the user to decide which certification authorities (CA) to trust, or to configure other means of server authentication. Warning: failing to perform server authentication would remove most security guarantees offered by TLS.

An example of using this class can be found in test/tls-client; see its Readme file for how to build, run, and if necessary debug it.

mbed-tls-sockets's People

Contributors

mpg avatar simonbutcher avatar

Watchers

James Cloos avatar crayfellow avatar  avatar

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.