Mercurial > pidgin.yaz
comparison libpurple/certificate.c @ 27912:a959b17ffc57
propagate from branch 'im.pidgin.pidgin' (head 571d5bf2fff9e937663ef53a174ae141999d6de2)
to branch 'im.pidgin.pidgin.yaz' (head c4723ff0e1616bd3e44b26659805f577c9d5b861)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 18 Dec 2008 05:23:37 +0000 |
parents | d9e3434d6416 1e227b8483ae |
children | 421857b25052 |
comparison
equal
deleted
inserted
replaced
24771:8fb78d30ea83 | 27912:a959b17ffc57 |
---|---|
1325 /* Next, check that the certificate chain is valid */ | 1325 /* Next, check that the certificate chain is valid */ |
1326 if ( ! purple_certificate_check_signature_chain(chain) ) { | 1326 if ( ! purple_certificate_check_signature_chain(chain) ) { |
1327 /* TODO: Tell the user where the chain broke? */ | 1327 /* TODO: Tell the user where the chain broke? */ |
1328 /* TODO: This error will hopelessly confuse any | 1328 /* TODO: This error will hopelessly confuse any |
1329 non-elite user. */ | 1329 non-elite user. */ |
1330 gchar *secondary; | 1330 if(purple_prefs_get_bool("/purple/network/warn_cert")) { |
1331 | 1331 gchar *secondary; |
1332 secondary = g_strdup_printf(_("The certificate chain presented" | 1332 |
1333 " for %s is not valid."), | 1333 secondary = g_strdup_printf(_("The certificate chain presented" |
1334 vrq->subject_name); | 1334 " for %s is not valid."), |
1335 | 1335 vrq->subject_name); |
1336 /* TODO: Make this error either block the ensuing SSL | 1336 |
1337 connection error until the user dismisses this one, or | 1337 /* TODO: Make this error either block the ensuing SSL |
1338 stifle it. */ | 1338 connection error until the user dismisses this one, or |
1339 purple_notify_error(NULL, /* TODO: Probably wrong. */ | 1339 stifle it. */ |
1340 _("SSL Certificate Error"), | 1340 purple_notify_error(NULL, /* TODO: Probably wrong. */ |
1341 _("Invalid certificate chain"), | 1341 _("SSL Certificate Error"), |
1342 secondary ); | 1342 _("Invalid certificate chain"), |
1343 g_free(secondary); | 1343 secondary ); |
1344 g_free(secondary); | |
1345 } | |
1344 | 1346 |
1345 /* Okay, we're done here */ | 1347 /* Okay, we're done here */ |
1346 purple_certificate_verify_complete(vrq, | 1348 purple_certificate_verify_complete(vrq, |
1347 PURPLE_CERTIFICATE_INVALID); | 1349 PURPLE_CERTIFICATE_INVALID); |
1348 return; | 1350 return; |
1396 that, too. */ | 1398 that, too. */ |
1397 /* TODO: Also mention the CA involved. While I could do this | 1399 /* TODO: Also mention the CA involved. While I could do this |
1398 now, a full DN is a little much with which to assault the | 1400 now, a full DN is a little much with which to assault the |
1399 user's poor, leaky eyes. */ | 1401 user's poor, leaky eyes. */ |
1400 /* TODO: This error message makes my eyes cross, and I wrote it */ | 1402 /* TODO: This error message makes my eyes cross, and I wrote it */ |
1401 gchar * secondary = | 1403 if(purple_prefs_get_bool("/purple/network/warn_cert")) { |
1402 g_strdup_printf(_("The certificate chain presented by " | 1404 |
1403 "%s does not have a valid digital " | 1405 gchar * secondary = |
1404 "signature from the Certificate " | 1406 g_strdup_printf(_("The certificate chain presented by " |
1405 "Authority from which it claims to " | 1407 "%s does not have a valid digital " |
1406 "have a signature."), | 1408 "signature from the Certificate " |
1407 vrq->subject_name); | 1409 "Authority from which it claims to " |
1410 "have a signature."), | |
1411 vrq->subject_name); | |
1408 | 1412 |
1409 purple_notify_error(NULL, /* TODO: Probably wrong */ | 1413 purple_notify_error(NULL, /* TODO: Probably wrong */ |
1410 _("SSL Certificate Error"), | 1414 _("SSL Certificate Error"), |
1411 _("Invalid certificate authority" | 1415 _("Invalid certificate authority" |
1412 " signature"), | 1416 " signature"), |
1413 secondary); | 1417 secondary); |
1414 g_free(secondary); | 1418 g_free(secondary); |
1415 | 1419 } |
1416 /* Signal "bad cert" */ | 1420 /* Signal "bad cert" */ |
1417 purple_certificate_verify_complete(vrq, | 1421 purple_certificate_verify_complete(vrq, |
1418 PURPLE_CERTIFICATE_INVALID); | 1422 PURPLE_CERTIFICATE_INVALID); |
1419 return; | 1423 return; |
1420 } /* if (CA signature not good) */ | 1424 } /* if (CA signature not good) */ |