libpurple/plugins/ssl/ssl-nss.c

branch
soc.2007.certmgr
changeset 19009
01fe9523e6d6
parent 19008
222e4861b5a2
child 19010
ad839d846fae
equal deleted inserted replaced
19008:222e4861b5a2 19009:01fe9523e6d6
413 } 413 }
414 414
415 static PurpleCertificate * 415 static PurpleCertificate *
416 x509_copy_certificate(PurpleCertificate *crt) 416 x509_copy_certificate(PurpleCertificate *crt)
417 { 417 {
418 return NULL; 418 CERTCertificate *crt_dat;
419 PurpleCertificate *newcrt;
420
421 g_return_val_if_fail(crt, NULL);
422 g_return_val_if_fail(crt->scheme == &x509_nss, NULL);
423
424 crt_dat = X509_NSS_DATA(crt);
425 g_return_val_if_fail(crt_dat, NULL);
426
427 /* Create the certificate copy */
428 newcrt = g_new0(PurpleCertificate, 1);
429 newcrt->scheme = &x509_nss;
430 newcrt->data = CERT_DupCertificate(crt_dat);
431
432 return newcrt;
419 } 433 }
420 434
421 /** Frees a Certificate 435 /** Frees a Certificate
422 * 436 *
423 * Destroys a Certificate's internal data structures and frees the pointer 437 * Destroys a Certificate's internal data structures and frees the pointer

mercurial