Azure IoT common library
Dependents: STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more
Diff: tlsio_wolfssl.c
- Revision:
- 48:81866008bba4
- Parent:
- 47:e59b74c745bc
--- a/tlsio_wolfssl.c Thu Jul 12 18:10:56 2018 -0700 +++ b/tlsio_wolfssl.c Tue Sep 11 11:15:08 2018 -0700 @@ -390,7 +390,11 @@ } } - if ((result == 0) && (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN)) + if (tls_io_instance->tlsio_state == TLSIO_STATE_ERROR) + { + result = WOLFSSL_CBIO_ERR_GENERAL; + } + else if ( (result == 0) && (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN)) { result = WOLFSSL_CBIO_ERR_WANT_READ; } @@ -488,7 +492,7 @@ LogError("unable to enable secure renegotiation"); result = __FAILURE__; } -#endif +#endif else { result = 0; @@ -574,7 +578,7 @@ void tlsio_wolfssl_deinit(void) { } - + CONCRETE_IO_HANDLE tlsio_wolfssl_create(void* io_create_parameters) { TLS_IO_INSTANCE* result; @@ -857,10 +861,6 @@ } } -const IO_INTERFACE_DESCRIPTION* tlsio_wolfssl_get_interface_description(void) -{ - return &tlsio_wolfssl_interface_description; -} static int process_option(char** destination, const char* name, const char* value) { @@ -947,3 +947,7 @@ return result; } +const IO_INTERFACE_DESCRIPTION* tlsio_wolfssl_get_interface_description(void) +{ + return &tlsio_wolfssl_interface_description; +}