ssl_set_dbg(ssl, pssl_debug, NULL);
ssl_set_bio(ssl, net_recv, fd, net_send, fd);
- ssl_set_ciphers(ssl, ciphers);
+ ssl_set_ciphersuites(ssl, ciphers);
ssl_set_session(ssl, 0, 0, ssn);
ssl_set_ca_chain(ssl, certificate.next, NULL, NULL);
rc = ssl_handshake(ssl);
if (rc != 0) {
- if (rc == POLARSSL_ERR_NET_TRY_AGAIN) {
+ if (rc == POLARSSL_ERR_NET_WANT_READ || rc == POLARSSL_ERR_NET_WANT_WRITE) {
return 0;
} else {
Log_warn("SSL handshake failed: %d", rc);
{
int rc;
rc = ssl_read(ssl, buf, len);
- if (rc == POLARSSL_ERR_NET_TRY_AGAIN)
+ if (rc == POLARSSL_ERR_NET_WANT_READ)
return SSLI_ERROR_WANT_READ;
return rc;
}
{
int rc;
rc = ssl_write(ssl, buf, len);
- if (rc == POLARSSL_ERR_NET_TRY_AGAIN)
+ if (rc == POLARSSL_ERR_NET_WANT_WRITE)
return SSLI_ERROR_WANT_WRITE;
return rc;
}