Example TLS client with wolfSSL
Dependencies: EthernetInterface-FRDM-k64F mbed-rtos mbed wolfSSL-TLS13-Beta Example-client-tls
Dependents: Example-client-tls
Diff: client-tls.cpp
- Revision:
- 3:97197dea8a38
- Parent:
- 2:76d10d65ce5b
- Child:
- 4:0cd0d8c9af1e
--- a/client-tls.cpp Tue Jul 21 22:47:09 2015 +0000 +++ b/client-tls.cpp Wed Jul 22 06:47:29 2015 +0000 @@ -131,7 +131,7 @@ printf("SSL_CTX_new error.\n"); return EXIT_FAILURE; } - + wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0); wolfSSL_SetIORecv(ctx, SocketReceive) ; wolfSSL_SetIOSend(ctx, SocketSend) ; @@ -150,6 +150,7 @@ } else { ret = wolfSSL_get_error(ssl, 0); printf("TLS Connect error[%d], %s\n", ret, wc_GetErrorString(ret)); + return EXIT_FAILURE; } /* frees all data before client termination */ wolfSSL_free(ssl);