diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-02-28 09:09:39 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-02-28 09:09:39 +0000 |
commit | eec2055b585608a68c3a6073143c2a49bb1dfff7 (patch) | |
tree | 625e0ee7afa0e06a7197a7f11326363e632133a6 /src | |
parent | 91282f23c547f0ddd35382d3a4b58db36fc007d7 (diff) |
validate SSL certificate hostname (#167).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3321 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/sslmanager.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sslmanager.c b/src/sslmanager.c index e184c699..8dce0526 100644 --- a/src/sslmanager.c +++ b/src/sslmanager.c @@ -99,7 +99,11 @@ gint ssl_manager_verify_cert(SockInfo *sockinfo, const gchar *hostname, message = g_string_new(""); g_string_append_printf(message, _("The SSL certificate of %s cannot be verified by the following reason:"), hostname); - g_string_append_printf(message, "\n %s\n\n", X509_verify_cert_error_string(verify_result)); + if (verify_result == X509_V_ERR_APPLICATION_VERIFICATION) { + g_string_append_printf(message, "\n certificate hostname does not match\n\n"); + } else { + g_string_append_printf(message, "\n %s\n\n", X509_verify_cert_error_string(verify_result)); + } g_string_append_printf(message, _("Subject: %s\n"), subject ? subject : "(unknown)"); g_string_append_printf(message, _("Issuer: %s\n"), issuer ? issuer : "(unknown)"); g_string_append_printf(message, _("Issued date: %s\n"), not_before); |