mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Merge pull request #1037 from berkerpeksag/fix-cert-null-check
Move NULL check for cert above pubkey
This commit is contained in:
commit
6d3e763248
@ -854,14 +854,13 @@ int irssi_ssl_handshake(GIOChannel *handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cert = SSL_get_peer_certificate(chan->ssl);
|
cert = SSL_get_peer_certificate(chan->ssl);
|
||||||
pubkey = X509_get_X509_PUBKEY(cert);
|
|
||||||
|
|
||||||
if (cert == NULL) {
|
if (cert == NULL) {
|
||||||
g_warning("TLS server supplied no certificate");
|
g_warning("TLS server supplied no certificate");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pubkey = X509_get_X509_PUBKEY(cert);
|
||||||
if (pubkey == NULL) {
|
if (pubkey == NULL) {
|
||||||
g_warning("TLS server supplied no certificate public key");
|
g_warning("TLS server supplied no certificate public key");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user