return ECORE_CON_SSL_ERROR_NONE;
error:
- if (svr->ssl)
- SSL_free(svr->ssl);
- if (svr->ssl_ctx)
- SSL_CTX_free(svr->ssl_ctx);
-
ERR("openssl error: %s", ERR_reason_error_string(ERR_get_error()));
+ _ecore_con_ssl_server_shutdown_openssl(svr);
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
}
SSL_set_accept_state(cl->ssl);
SSL_ERROR_CHECK_GOTO_ERROR(!SSL_set_fd(cl->ssl, cl->fd));
- SSL_ERROR_CHECK_GOTO_ERROR(SSL_do_handshake(cl->ssl) < 1);
+ SSL_ERROR_CHECK_GOTO_ERROR(SSL_accept(cl->ssl) < 1);
return ECORE_CON_SSL_ERROR_NONE;
error:
- if (cl->ssl)
- SSL_free(cl->ssl);
-
ERR("openssl error: %s", ERR_reason_error_string(ERR_get_error()));
+ _ecore_con_ssl_client_shutdown_openssl(cl);
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
}