From b625c88a67183f545ef2d80375a07b98d637d76b Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Tue, 1 Aug 2017 23:53:05 -0400 Subject: [PATCH] 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. --- sbr/netsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( -- 2.56.0