From 9630e237abcf255e3b2cff88248fb15ffaf3e778 Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Mon, 27 Feb 2023 16:07:27 -0700 Subject: [PATCH] report full error string on SSL_connect() failure Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/575 --- usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c b/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c index caa3b5266e48..b473d642c257 100644 --- a/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c +++ b/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c @@ -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); }