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 Francois Berder

Revision:
0:6fa35c8074ce
Child:
1:a5e7369f39d9
--- /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;
+}