comparison libpurple/certificate.c @ 32673:1bcedeb32bb4

Remove the old deprecated purple_certificate_check_signature_chain. Rename purple_certificate_check_signature_chain_with_failing to purple_certificate_check_signature_chain.
author andrew.victor@mxit.com
date Sat, 24 Sep 2011 16:36:57 +0000
parents a3b1dcf433b5
children 0f94ec89f0bc
comparison
equal deleted inserted replaced
32672:fa4b88cf8b56 32673:1bcedeb32bb4
273 273
274 return (scheme->signed_by)(crt, issuer); 274 return (scheme->signed_by)(crt, issuer);
275 } 275 }
276 276
277 gboolean 277 gboolean
278 purple_certificate_check_signature_chain_with_failing(GList *chain, 278 purple_certificate_check_signature_chain(GList *chain,
279 PurpleCertificate **failing) 279 PurpleCertificate **failing)
280 { 280 {
281 GList *cur; 281 GList *cur;
282 PurpleCertificate *crt, *issuer; 282 PurpleCertificate *crt, *issuer;
283 gchar *uid; 283 gchar *uid;
359 } 359 }
360 360
361 /* If control reaches this point, the chain is valid */ 361 /* If control reaches this point, the chain is valid */
362 purple_debug_info("certificate", "Chain is VALID\n"); 362 purple_debug_info("certificate", "Chain is VALID\n");
363 return TRUE; 363 return TRUE;
364 }
365
366 gboolean
367 purple_certificate_check_signature_chain(GList *chain)
368 {
369 return purple_certificate_check_signature_chain_with_failing(chain, NULL);
370 } 364 }
371 365
372 PurpleCertificate * 366 PurpleCertificate *
373 purple_certificate_import(PurpleCertificateScheme *scheme, const gchar *filename) 367 purple_certificate_import(PurpleCertificateScheme *scheme, const gchar *filename)
374 { 368 {
1620 } /* if (self signed) */ 1614 } /* if (self signed) */
1621 1615
1622 ca = purple_certificate_find_pool(x509_tls_cached.scheme_name, "ca"); 1616 ca = purple_certificate_find_pool(x509_tls_cached.scheme_name, "ca");
1623 1617
1624 /* Next, check that the certificate chain is valid */ 1618 /* Next, check that the certificate chain is valid */
1625 if (!purple_certificate_check_signature_chain_with_failing(chain, 1619 if (!purple_certificate_check_signature_chain(chain,
1626 &failing_crt)) 1620 &failing_crt))
1627 { 1621 {
1628 gboolean chain_validated = FALSE; 1622 gboolean chain_validated = FALSE;
1629 /* 1623 /*
1630 * Check if the failing certificate is in the CA store. If it is, then 1624 * Check if the failing certificate is in the CA store. If it is, then