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
Revision 1:a5e7369f39d9, committed 2013-09-18
- Comitter:
- feb11
- Date:
- Wed Sep 18 09:07:45 2013 +0000
- Parent:
- 0:6fa35c8074ce
- Child:
- 2:a223b3c8a334
- Commit message:
- update lib
Changed in this revision
| TLS_cyassl.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TLS_cyassl.lib Thu Sep 12 16:38:57 2013 +0000 +++ b/TLS_cyassl.lib Wed Sep 18 09:07:45 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/feb11/code/TLS_cyassl/#815067fd66c9 +http://mbed.org/users/feb11/code/TLS_cyassl/#29069dd9abfc
--- 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;
