summaryrefslogtreecommitdiff
path: root/src/lib/tls/x509_nss.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-04 12:59:47 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-04 14:52:35 -0400
commitad94d43fc50525e8814b6e99f78d4b9635fa80ca (patch)
treece39bdaf6b1327de87a68ed749343bb018cf8ab6 /src/lib/tls/x509_nss.c
parent59c1b34b72ec6c55ca4de0c56a9be3da3d1c3e08 (diff)
downloadtor-ad94d43fc50525e8814b6e99f78d4b9635fa80ca.tar.gz
tor-ad94d43fc50525e8814b6e99f78d4b9635fa80ca.zip
Port test_tortls_verify to not depend on openssl internals
Diffstat (limited to 'src/lib/tls/x509_nss.c')
-rw-r--r--src/lib/tls/x509_nss.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/tls/x509_nss.c b/src/lib/tls/x509_nss.c
index 68aebbb69a..5bb7940c90 100644
--- a/src/lib/tls/x509_nss.c
+++ b/src/lib/tls/x509_nss.c
@@ -225,11 +225,13 @@ tor_x509_cert_impl_free_(tor_x509_cert_impl_t *cert)
CERT_DestroyCertificate(cert);
}
-tor_x509_cert_t *
-tor_x509_cert_dup(const tor_x509_cert_t *cert)
+tor_x509_cert_impl_t *
+tor_x509_cert_impl_dup_(tor_x509_cert_impl_t *cert)
{
- tor_assert(cert);
- return tor_x509_cert_new(CERT_DupCertificate(cert->cert));
+ if (cert)
+ return CERT_DupCertificate(cert);
+ else
+ return NULL;
}
/**