| 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 |