# HG changeset patch # User Paul Aurich # Date 1255668159 0 # Node ID 64fbf431d9520171d46b0d7671b5fde57bb77c79 # Parent b7d60f0e1df2c29414ff474298bfff34289a02bd Print that specific message only when there is a CN; otherwise fall back to the error from invalidity_reason_to_string(). Fixes #10519. Thanks for pointing this out, QuLogic. diff -r b7d60f0e1df2 -r 64fbf431d952 libpurple/certificate.c --- a/libpurple/certificate.c Fri Oct 16 02:39:40 2009 +0000 +++ b/libpurple/certificate.c Fri Oct 16 04:42:39 2009 +0000 @@ -1402,13 +1402,15 @@ if (flags & PURPLE_CERTIFICATE_NAME_MISMATCH) { gchar *sn = purple_certificate_get_subject_name(peer_crt); - g_string_append_printf(errors, _("The certificate claims to be " - "from \"%s\" instead. This could mean that you are " - "not connecting to the service you believe you are."), - sn ? sn : "(null)"); - g_free(sn); + if (sn) { + g_string_append_printf(errors, _("The certificate claims to be " + "from \"%s\" instead. This could mean that you are " + "not connecting to the service you believe you are."), + sn); + g_free(sn); - flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH; + flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH; + } } while (i != PURPLE_CERTIFICATE_LAST) {