MbedTLS: Set socket send/receive functions after initialising session
This commit is contained in:
parent
978c8ae828
commit
46c61dd478
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,6 @@ rb_ssl_init_fd(rb_fde_t *const F, rb_fd_tls_direction dir)
|
|||
}
|
||||
|
||||
mbedtls_ssl_init(&mbed_ssl_ctx->ssl);
|
||||
mbedtls_ssl_set_bio(&mbed_ssl_ctx->ssl, F, rb_sock_net_xmit, rb_sock_net_recv, NULL);
|
||||
|
||||
int ret;
|
||||
|
||||
|
@ -156,6 +155,8 @@ rb_ssl_init_fd(rb_fde_t *const F, rb_fd_tls_direction dir)
|
|||
return;
|
||||
}
|
||||
|
||||
mbedtls_ssl_set_bio(&mbed_ssl_ctx->ssl, F, rb_sock_net_xmit, rb_sock_net_recv, NULL);
|
||||
|
||||
rb_mbedtls_cfg_incref(rb_mbedtls_cfg);
|
||||
mbed_ssl_ctx->cfg = rb_mbedtls_cfg;
|
||||
|
||||
|
|
Loading…
Reference in a new issue