summaryrefslogtreecommitdiff
path: root/src/lib/tls/x509.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/x509.c')
-rw-r--r--src/lib/tls/x509.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/tls/x509.c b/src/lib/tls/x509.c
index c88298b6cf..2e70206462 100644
--- a/src/lib/tls/x509.c
+++ b/src/lib/tls/x509.c
@@ -134,3 +134,12 @@ tor_x509_cert_new,(tor_x509_cert_impl_t *x509_cert))
tor_x509_cert_impl_free_(x509_cert);
return NULL;
}
+
+/** Return a new copy of <b>cert</b>. */
+tor_x509_cert_t *
+tor_x509_cert_dup(const tor_x509_cert_t *cert)
+{
+ tor_assert(cert);
+ tor_assert(cert->cert);
+ return tor_x509_cert_new(tor_x509_cert_impl_dup_(cert->cert));
+}