]> diplodocus.org Git - nmh/commitdiff
Use original error code from OpenSSL.
authorKen Hornstein <kenh@pobox.com>
Wed, 31 May 2017 15:53:47 +0000 (11:53 -0400)
committerKen Hornstein <kenh@pobox.com>
Wed, 31 May 2017 17:59:53 +0000 (13:59 -0400)
Reuse the error code we already retrieved from OpenSSL, otherwise the
error might be cleared the next time we call ERR_get_error().

sbr/netsec.c

index a64743a..358b97d 100644 (file)
@@ -1631,7 +1631,7 @@ netsec_negotiate_tls(netsec_context *nsc, char **errstr)
            }
        } else {
            netsec_err(errstr, "TLS negotiation failed: %s",
-                      ERR_error_string(ERR_get_error(), NULL));
+                      ERR_error_string(errcode, NULL));
        }
 
        /*