This program shows how to use TLS_cyassl to connect to mbed.org
Dependencies: EthernetInterface6 TLS_cyassl mbed-rtos mbed
Fork of TLS_cyassl-Example by
Diff: main.cpp
- Revision:
- 1:a5e7369f39d9
- Parent:
- 0:6fa35c8074ce
- Child:
- 2:a223b3c8a334
--- a/main.cpp Thu Sep 12 16:38:57 2013 +0000 +++ b/main.cpp Wed Sep 18 09:07:45 2013 +0000 @@ -1,18 +1,20 @@ #include "mbed.h" #include "EthernetInterface.h" #include "TLSConnection.h" +#include "TLSServer.h" const char host[] = "mbed.org"; int main() { + set_time(1379062044); EthernetInterface eth; if(eth.init() || eth.connect()) { printf("Error with EthernetInterface\n\r"); return -1; } - + TLSConnection con; if(!con.connect(host)) { @@ -23,6 +25,7 @@ printf("Connected to %s\n !", host); con.close(); } + eth.disconnect(); return 0;