A fork of the TLS_cyassl embedded SSL library with certificate validation disabled.
Fork of TLS_cyassl by
Revision 7:5c1e73469291, committed 2015-01-24
- Comitter:
- glbast
- Date:
- Sat Jan 24 00:30:50 2015 +0000
- Parent:
- 6:c12f49c210c2
- Commit message:
- Disabled SSL certificate checking.
Changed in this revision
TLSConnection.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c12f49c210c2 -r 5c1e73469291 TLSConnection.cpp --- 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; }