Mercurial > pidgin.yaz
comparison libpurple/certificate.c @ 19497:d351a42435a9
- TODO whacking and cosmetics
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Mon, 20 Aug 2007 16:25:44 +0000 |
parents | 004c3e257bd0 |
children | d5ecaf5bce93 |
comparison
equal
deleted
inserted
replaced
19496:004c3e257bd0 | 19497:d351a42435a9 |
---|---|
1295 "certificate cannot be " | 1295 "certificate cannot be " |
1296 "validated.")); | 1296 "validated.")); |
1297 return; | 1297 return; |
1298 } | 1298 } |
1299 | 1299 |
1300 /* TODO: I don't have the Glib documentation handy; is this correct? */ | |
1301 last = g_list_last(chain); | 1300 last = g_list_last(chain); |
1302 end_crt = (PurpleCertificate *) last->data; | 1301 end_crt = (PurpleCertificate *) last->data; |
1303 | 1302 |
1304 /* Attempt to look up the last certificate's issuer */ | 1303 /* Attempt to look up the last certificate's issuer */ |
1305 ca_id = purple_certificate_get_issuer_unique_id(end_crt); | 1304 ca_id = purple_certificate_get_issuer_unique_id(end_crt); |
1334 gchar * secondary = | 1333 gchar * secondary = |
1335 g_strdup_printf(_("The certificate chain presented by " | 1334 g_strdup_printf(_("The certificate chain presented by " |
1336 "%s does not have a valid digital " | 1335 "%s does not have a valid digital " |
1337 "signature from the Certificate " | 1336 "signature from the Certificate " |
1338 "Authority from which it claims to " | 1337 "Authority from which it claims to " |
1339 "have a signature from."), | 1338 "have a signature."), |
1340 vrq->subject_name); | 1339 vrq->subject_name); |
1341 | 1340 |
1342 purple_notify_error(NULL, /* TODO: Probably wrong */ | 1341 purple_notify_error(NULL, /* TODO: Probably wrong */ |
1343 _("SSL Certificate Error"), | 1342 _("SSL Certificate Error"), |
1344 _("Invalid certificate authority" | 1343 _("Invalid certificate authority" |
1404 purple_debug_info("certificate/x509/tls_cached", | 1403 purple_debug_info("certificate/x509/tls_cached", |
1405 "...Found cached cert\n"); | 1404 "...Found cached cert\n"); |
1406 /* vrq is now the responsibility of cert_in_cache */ | 1405 /* vrq is now the responsibility of cert_in_cache */ |
1407 x509_tls_cached_cert_in_cache(vrq); | 1406 x509_tls_cached_cert_in_cache(vrq); |
1408 } else { | 1407 } else { |
1409 /* TODO: Prompt the user, etc. */ | |
1410 purple_debug_info("certificate/x509/tls_cached", | 1408 purple_debug_info("certificate/x509/tls_cached", |
1411 "...Not in cache\n"); | 1409 "...Not in cache\n"); |
1412 /* vrq now becomes the problem of unknown_peer */ | 1410 /* vrq now becomes the problem of unknown_peer */ |
1413 x509_tls_cached_unknown_peer(vrq); | 1411 x509_tls_cached_unknown_peer(vrq); |
1414 } | 1412 } |
1728 } | 1726 } |
1729 | 1727 |
1730 gboolean | 1728 gboolean |
1731 purple_certificate_unregister_pool(PurpleCertificatePool *pool) | 1729 purple_certificate_unregister_pool(PurpleCertificatePool *pool) |
1732 { | 1730 { |
1733 /* TODO: Better error checking? */ | |
1734 if (NULL == pool) { | 1731 if (NULL == pool) { |
1735 purple_debug_warning("certificate", | 1732 purple_debug_warning("certificate", |
1736 "Attempting to unregister NULL pool\n"); | 1733 "Attempting to unregister NULL pool\n"); |
1737 return FALSE; | 1734 return FALSE; |
1738 } | 1735 } |