Mercurial > pidgin
comparison libpurple/plugins/ssl/ssl-nss.c @ 19083:5b8035030053
- Comment on NSS's refcounting prowess
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Fri, 10 Aug 2007 03:51:49 +0000 |
parents | 3004bfa0e846 |
children | 7fa5d10969f4 |
comparison
equal
deleted
inserted
replaced
19082:ddb5ad55f2d2 | 19083:5b8035030053 |
---|---|
425 g_return_val_if_fail(crt_dat, NULL); | 425 g_return_val_if_fail(crt_dat, NULL); |
426 | 426 |
427 /* Create the certificate copy */ | 427 /* Create the certificate copy */ |
428 newcrt = g_new0(PurpleCertificate, 1); | 428 newcrt = g_new0(PurpleCertificate, 1); |
429 newcrt->scheme = &x509_nss; | 429 newcrt->scheme = &x509_nss; |
430 /* NSS does refcounting automatically */ | |
430 newcrt->data = CERT_DupCertificate(crt_dat); | 431 newcrt->data = CERT_DupCertificate(crt_dat); |
431 | 432 |
432 return newcrt; | 433 return newcrt; |
433 } | 434 } |
434 | 435 |
450 | 451 |
451 crt_dat = X509_NSS_DATA(crt); | 452 crt_dat = X509_NSS_DATA(crt); |
452 g_return_if_fail(crt_dat); | 453 g_return_if_fail(crt_dat); |
453 | 454 |
454 /* Finally we have the certificate. So let's kill it */ | 455 /* Finally we have the certificate. So let's kill it */ |
456 /* NSS does refcounting automatically */ | |
455 CERT_DestroyCertificate(crt_dat); | 457 CERT_DestroyCertificate(crt_dat); |
456 } | 458 } |
457 | 459 |
458 /** Determines whether one certificate has been issued and signed by another | 460 /** Determines whether one certificate has been issued and signed by another |
459 * | 461 * |