Example apps: Don't use runtime IO config API if CBs are hardcoded
Multiple example applications still use mbedtls_ssl_set_bio() even if the I/O callbacks are hardcoded. This commit fixes this.
This commit is contained in:
parent
2a0cd5a031
commit
41e5a6871d
9 changed files with 73 additions and 11 deletions
|
@ -300,7 +300,14 @@ int main( void )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
mbedtls_ssl_set_bio( &ssl, &client_fd, mbedtls_net_send, mbedtls_net_recv, NULL );
|
||||
#if !defined(MBEDTLS_SSL_CONF_RECV) && \
|
||||
!defined(MBEDTLS_SSL_CONF_SEND) && \
|
||||
!defined(MBEDTLS_SSL_CONF_RECV_TIMEOUT)
|
||||
mbedtls_ssl_set_bio( &ssl, &client_fd,
|
||||
mbedtls_net_send, mbedtls_net_recv, NULL );
|
||||
#else
|
||||
mbedtls_ssl_set_bio_ctx( &ssl, &client_fd );
|
||||
#endif
|
||||
|
||||
mbedtls_printf( "pid %d: SSL setup ok\n", pid );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue