Skip to content

Commit 24adaf5

Browse files
committed
Actually set the tlscert conn reference
Previously it was always NULL
1 parent a2b3b6b commit 24adaf5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/tls_gnutls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ static int _tls_verify(gnutls_session_t session)
422422
return -1;
423423
}
424424

425+
tlscert->conn = tls->conn;
426+
425427
if (tls->conn->certfail_handler(tlscert, (char *)out.data) == 0) {
426428
xmpp_tlscert_free(tlscert);
427429
gnutls_x509_crt_deinit(cert);

src/tls_openssl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ static int _tls_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
540540
if (!tlscert)
541541
return 0;
542542

543+
tlscert->conn = conn;
544+
543545
strophe_debug(conn->ctx, "tls", "preverify_ok:%d\nSubject: %s\nIssuer: %s",
544546
preverify_ok, tlscert->elements[XMPP_CERT_SUBJECT],
545547
tlscert->elements[XMPP_CERT_ISSUER]);

0 commit comments

Comments
 (0)