report full error string on SSL_connect() failure

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/575
This commit is contained in:
Vladimir Kotal 2023-02-27 16:07:27 -07:00 committed by Warner Losh
parent 55747938b5
commit 9630e237ab

View File

@ -680,8 +680,8 @@ rpctls_connect(SSL_CTX *ctx, int s, char *certname, u_int certlen, X509 **certp)
ret = SSL_connect(ssl);
if (ret != 1) {
rpctls_verbose_out("rpctls_connect: "
"SSL_connect failed %d\n",
ret);
"SSL_connect failed %d: %s\n",
ret, ERR_error_string(ERR_get_error(), NULL));
SSL_free(ssl);
return (NULL);
}