Mercurial > pidgin.yaz
diff libpurple/certificate.c @ 27925:93950851db8c
propagate from branch 'im.pidgin.pidgin' (head 586bc4a7e754d6b26a95c0d69dd5f2967c7a98a1)
to branch 'im.pidgin.pidgin.yaz' (head a133b1255cf2e94684f42e5e8fd335d6db91c053)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 28 Jan 2009 04:09:41 +0000 |
parents | fc8fd4fef166 421857b25052 |
children | d8e6a2d592a4 |
line wrap: on
line diff
--- a/libpurple/certificate.c Tue Jan 27 05:25:01 2009 +0000 +++ b/libpurple/certificate.c Wed Jan 28 04:09:41 2009 +0000 @@ -1328,20 +1328,22 @@ /* TODO: Tell the user where the chain broke? */ /* TODO: This error will hopelessly confuse any non-elite user. */ - gchar *secondary; + if(purple_prefs_get_bool("/purple/network/warn_cert")) { + gchar *secondary; - secondary = g_strdup_printf(_("The certificate chain presented" - " for %s is not valid."), - vrq->subject_name); + secondary = g_strdup_printf(_("The certificate chain presented" + " for %s is not valid."), + vrq->subject_name); - /* TODO: Make this error either block the ensuing SSL - connection error until the user dismisses this one, or - stifle it. */ - purple_notify_error(NULL, /* TODO: Probably wrong. */ - _("SSL Certificate Error"), - _("Invalid certificate chain"), - secondary ); - g_free(secondary); + /* TODO: Make this error either block the ensuing SSL + connection error until the user dismisses this one, or + stifle it. */ + purple_notify_error(NULL, /* TODO: Probably wrong. */ + _("SSL Certificate Error"), + _("Invalid certificate chain"), + secondary ); + g_free(secondary); + } /* Okay, we're done here */ purple_certificate_verify_complete(vrq, @@ -1399,21 +1401,23 @@ now, a full DN is a little much with which to assault the user's poor, leaky eyes. */ /* TODO: This error message makes my eyes cross, and I wrote it */ - gchar * secondary = - g_strdup_printf(_("The certificate chain presented by " - "%s does not have a valid digital " - "signature from the Certificate " - "Authority from which it claims to " - "have a signature."), - vrq->subject_name); + if(purple_prefs_get_bool("/purple/network/warn_cert")) { + + gchar * secondary = + g_strdup_printf(_("The certificate chain presented by " + "%s does not have a valid digital " + "signature from the Certificate " + "Authority from which it claims to " + "have a signature."), + vrq->subject_name); - purple_notify_error(NULL, /* TODO: Probably wrong */ - _("SSL Certificate Error"), - _("Invalid certificate authority" - " signature"), - secondary); - g_free(secondary); - + purple_notify_error(NULL, /* TODO: Probably wrong */ + _("SSL Certificate Error"), + _("Invalid certificate authority" + " signature"), + secondary); + g_free(secondary); + } /* Signal "bad cert" */ purple_certificate_verify_complete(vrq, PURPLE_CERTIFICATE_INVALID);