From: Ken Hornstein Date: Wed, 2 Aug 2017 03:53:05 +0000 (-0400) Subject: Use correct error code for SSL context retrieval. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b625c88a67183f545ef2d80375a07b98d637d76b?ds=inline Use correct error code for SSL context retrieval. Make sure we use the correct error code if we are unable to retrieve the SSL context from the context from the BIO. --- diff --git a/sbr/netsec.c b/sbr/netsec.c index ab05cf8e..3fcb2cf5 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -1631,7 +1631,7 @@ netsec_negotiate_tls(netsec_context *nsc, char **errstr) if (BIO_get_ssl(nsc->ssl_io, &ssl) < 1) { netsec_err(errstr, "Certificate verification failed, but " "cannot retrieve SSL handle: %s", - ERR_error_string(errcode, NULL)); + ERR_error_string(ERR_get_error(), NULL)); } else { netsec_err(errstr, "Server certificate verification failed: %s", X509_verify_cert_error_string(