diff options
-rw-r--r-- | smtp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |