summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-11-21 11:42:54 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-11-21 11:42:54 -0500
commit16a657b2626a66d15fc4c35041cd30f94ed4d17d (patch)
tree66ca577f66f442fe0d309e665f4ddb5f9ebabbcc
parent6a3abcb7a2f121d32b6ead9369e31c9a21534cf6 (diff)
Produce more useful "Invalid peer certificate" error messagesHEADmaster
-rw-r--r--smtp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/smtp.c b/smtp.c
index 796578d..00cf066 100644
--- a/smtp.c
+++ b/smtp.c
@@ -18,6 +18,7 @@
#include <pwd.h>
#include <unistd.h>
+#include <openssl/ssl.h>
#include <auth-client.h>
#include <libesmtp.h>
@@ -210,7 +211,9 @@ static void event_cb (smtp_session_t session, int event_no, void *arg, ...)
long result = va_arg (ap, long);
int *ok = va_arg (ap, int *);
- fprintf(stderr, "Invalid peer certificate (error %ld)\n", result);
+ fprintf(stderr, "Invalid peer certificate (error %ld: %s)\n",
+ result,
+ X509_verify_cert_error_string(result));
*ok = 0;
break;