wrapper of the mbed port of Cyassl. It's based of the work of Ashley Mills

Dependencies:   cyassl-lib

Dependents:   TLS_cyassl-Example TLS_cyassl-Example2 HTTPSClientExample2

Fork of TLS_cyassl by Francois Berder

Import programTLS_cyassl-Example

This program shows how to use TLS_cyassl to connect to mbed.org

Import programTLS_cyassl-Example2

This example show how to create a small TLS server using the TLS_cyassl library.

Committer:
feb11
Date:
Wed Sep 18 15:18:51 2013 +0000
Revision:
6:c12f49c210c2
Parent:
4:86a5029194b4
added some comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
feb11 4:86a5029194b4 1 #ifndef TLSSERVER_H
feb11 4:86a5029194b4 2 #define TLSSERVER_H
feb11 4:86a5029194b4 3
feb11 4:86a5029194b4 4 #include "mbed.h"
feb11 4:86a5029194b4 5 #include "cyassl/ssl.h"
feb11 4:86a5029194b4 6 #include "TLSConnection.h"
feb11 4:86a5029194b4 7
feb11 6:c12f49c210c2 8
feb11 4:86a5029194b4 9 class TLSServer : public Socket
feb11 4:86a5029194b4 10 {
feb11 4:86a5029194b4 11 public :
feb11 4:86a5029194b4 12
feb11 4:86a5029194b4 13 TLSServer();
feb11 4:86a5029194b4 14 ~TLSServer();
feb11 4:86a5029194b4 15
feb11 6:c12f49c210c2 16 /** Initialize the server.
feb11 6:c12f49c210c2 17 It listens on port 443, init CyaSSL, load certificates and create CyaSSL context.
feb11 6:c12f49c210c2 18
feb11 6:c12f49c210c2 19 \return True if the initializations is completed with success, false otherwise.
feb11 6:c12f49c210c2 20 */
feb11 4:86a5029194b4 21 bool init();
feb11 4:86a5029194b4 22
feb11 6:c12f49c210c2 23 /** Accept incoming connection
feb11 6:c12f49c210c2 24
feb11 6:c12f49c210c2 25 \return True if it managed to create successfully a new connection, false otherwise.
feb11 6:c12f49c210c2 26 */
feb11 4:86a5029194b4 27 bool accept(TLSConnection &con);
feb11 4:86a5029194b4 28
feb11 4:86a5029194b4 29
feb11 4:86a5029194b4 30 private :
feb11 4:86a5029194b4 31
feb11 4:86a5029194b4 32 CYASSL_CTX *_ssl_ctx;
feb11 4:86a5029194b4 33 };
feb11 4:86a5029194b4 34
feb11 4:86a5029194b4 35 #endif