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 0:6fa35c8074ce, committed 2013-09-12
- Comitter:
- feb11
- Date:
- Thu Sep 12 16:38:57 2013 +0000
- Child:
- 1:a5e7369f39d9
- Commit message:
- intial import
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetInterface.lib Thu Sep 12 16:38:57 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/feb11/code/EthernetInterface6/#74e520e27598
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TLS_cyassl.lib Thu Sep 12 16:38:57 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/feb11/code/TLS_cyassl/#815067fd66c9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Sep 12 16:38:57 2013 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "EthernetInterface.h"
+#include "TLSConnection.h"
+
+const char host[] = "mbed.org";
+
+int main()
+{
+ EthernetInterface eth;
+ if(eth.init() || eth.connect())
+ {
+ printf("Error with EthernetInterface\n\r");
+ return -1;
+ }
+
+ TLSConnection con;
+ if(!con.connect(host))
+ {
+ printf("Failed to connect to %s\n", host);
+ }
+ else
+ {
+ printf("Connected to %s\n !", host);
+ con.close();
+ }
+ eth.disconnect();
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Thu Sep 12 16:38:57 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#ee87e782d34f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Sep 12 16:38:57 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9c8f0e3462fb \ No newline at end of file
