]> diplodocus.org Git - nmh/commitdiff
Sigh, the return value from SSL_get_error() isn't suitable to give
authorKen Hornstein <kenh@pobox.com>
Sat, 1 Oct 2016 05:02:34 +0000 (01:02 -0400)
committerKen Hornstein <kenh@pobox.com>
Sat, 1 Oct 2016 05:02:34 +0000 (01:02 -0400)
to ERR_get_error(), so use a different function to get the error.

sbr/netsec.c

index d76856e0116cd0203f6eb9b84b3f98a1763b96df..5f822b1951773ded42418f977b61b78b095e9a7b 100644 (file)
@@ -588,7 +588,7 @@ retry:
                netsec_err(errstr, "TLS peer closed remote connection");
            } else {
                netsec_err(errstr, "TLS network read failed: %s",
                netsec_err(errstr, "TLS peer closed remote connection");
            } else {
                netsec_err(errstr, "TLS network read failed: %s",
-                          ERR_error_string(errcode, NULL));
+                          ERR_error_string(ERR_peek_last_error(), NULL));
            }
            if (nsc->ns_snoop)
                ERR_print_errors_fp(stderr);
            }
            if (nsc->ns_snoop)
                ERR_print_errors_fp(stderr);