]> diplodocus.org Git - nmh/commitdiff
Use correct error code for SSL context retrieval.
authorKen Hornstein <kenh@pobox.com>
Wed, 2 Aug 2017 03:53:05 +0000 (23:53 -0400)
committerKen Hornstein <kenh@pobox.com>
Wed, 2 Aug 2017 03:53:05 +0000 (23:53 -0400)
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

index ab05cf8..3fcb2cf 100644 (file)
@@ -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(