send ssl struct when logging error message

FossilOrigin-Name: 3fdaf0bd98b07ef474fc82ff2d61ded4f740cfe399241d932a88430dce5a6540
This commit is contained in:
root 2020-03-07 23:57:19 +00:00
parent 25f244a8bd
commit f837f51262
1 changed files with 7 additions and 9 deletions

View File

@ -42,7 +42,8 @@ static BIO_METHOD bio_methods = {
} }
int dtls_openssl_connect(struct conn *conn) int
dtls_openssl_connect(struct conn *conn)
{ {
struct dtls_openssl_data *d; struct dtls_openssl_data *d;
int rc; int rc;
@ -58,8 +59,8 @@ int dtls_openssl_connect(struct conn *conn)
return 0; return 0;
/* /*
// if (conn->dtls_psk) if (conn->dtls_psk)
// SSL_set_psk_client_callback(d->ssl, psk_client_cb); SSL_set_psk_client_callback(d->ssl, psk_client_cb);
*/ */
@ -68,7 +69,7 @@ int dtls_openssl_connect(struct conn *conn)
do { do {
rc = SSL_connect(d->ssl); rc = SSL_connect(d->ssl);
}while(rc!=1 && errno==EAGAIN && !cw_timer_timeout(timer)); }while(rc!=1 && errno==EAGAIN && !cw_timer_timeout(timer));
if (rc == 1) { if (rc == 1) {
cw_dbg(DBG_DTLS,"SSL connect successfull!"); cw_dbg(DBG_DTLS,"SSL connect successfull!");
@ -77,10 +78,7 @@ int dtls_openssl_connect(struct conn *conn)
return 1; return 1;
} }
rc = dtls_openssl_log_error(0, rc, "DTLS connect"); rc = dtls_openssl_log_error(d->ssl, rc, "DTLS connect");
return 0; return 0;
} }