A fork of the TLS_cyassl embedded SSL library with certificate validation disabled.

Dependencies:   cyassl-lib

Fork of TLS_cyassl by Francois Berder

Revision:
7:5c1e73469291
Parent:
3:0e5471a26490
--- a/TLSConnection.cpp	Wed Sep 18 15:18:51 2013 +0000
+++ b/TLSConnection.cpp	Sat Jan 24 00:30:50 2015 +0000
@@ -67,7 +67,8 @@
     if(_ssl_ctx == NULL)
     {
         return false;
-    }    
+    }
+    CyaSSL_CTX_set_verify(_ssl_ctx, SSL_VERIFY_NONE, 0); 
     CyaSSL_SetIOSend(_ssl_ctx, &sendFunc);
     CyaSSL_SetIORecv(_ssl_ctx, &receiveFunc);
     CyaSSL_CTX_load_verify_buffer(_ssl_ctx,(unsigned char*)root_cert, root_cert_len,SSL_FILETYPE_ASN1);
@@ -119,8 +120,9 @@
 
     _is_connected = false;
 
+    CyaSSL_free(_ssl);
     CyaSSL_CTX_free(_ssl_ctx);
-    CyaSSL_Cleanup();  
+    CyaSSL_Cleanup();
 
     return Socket::close(shutdown) == 0;
 }