# HG changeset patch # User Yoshiki Yazawa # Date 1223613042 0 # Node ID 945a04f3019e528fe88fa14977700760f6f22114 # Parent 6ed03eec37d907f013766b5d2d10e5938fce036f made pidgin warn only if "/purple/network/warn_cert" has been set. diff -r 6ed03eec37d9 -r 945a04f3019e libpurple/certificate.c --- a/libpurple/certificate.c Fri Oct 10 03:32:39 2008 +0000 +++ b/libpurple/certificate.c Fri Oct 10 04:30:42 2008 +0000 @@ -1327,20 +1327,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, @@ -1398,21 +1400,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);