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:
- 9:0b93e8d9a31c
- Parent:
- 8:4a483e3d805e
- Child:
- 10:37e38ee43b8f
--- a/client-tls.cpp Fri Jun 02 03:03:55 2017 +0000 +++ b/client-tls.cpp Tue Aug 22 10:59:36 2017 +0000 @@ -127,7 +127,11 @@ int ret = 0; /* create and initiLize WOLFSSL_CTX structure */ + #ifdef WOLFSSL_TLS13 + if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) { + #else if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) { + #endif printf("SSL_CTX_new error.\n"); return EXIT_FAILURE; }