summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-23 22:31:10 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-23 22:31:10 +0000
commit5a5670410b2cf3c90f5ef8534c48feb0c97532bb (patch)
treeeca679a144735d2d0a05b8d6f4c642852c5c3cc3 /include
parent494db4cd51a5896778fcda150ed9c29b92ef504a (diff)
downloadnetsurf-5a5670410b2cf3c90f5ef8534c48feb0c97532bb.tar.gz
netsurf-5a5670410b2cf3c90f5ef8534c48feb0c97532bb.tar.bz2
ssl_certs: Add dup_into
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'include')
-rw-r--r--include/netsurf/ssl_certs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/netsurf/ssl_certs.h b/include/netsurf/ssl_certs.h
index 1aaf485a7..b5e79abd5 100644
--- a/include/netsurf/ssl_certs.h
+++ b/include/netsurf/ssl_certs.h
@@ -87,6 +87,18 @@ struct cert_chain {
nserror cert_chain_alloc(size_t depth, struct cert_chain **chain_out);
/**
+ * duplicate a certificate chain into an existing chain
+ *
+ * \param src The certificate chain to copy from
+ * \param dst The chain to overwrite with a copy of src
+ * \return NSERROR_OK on success or NSERROR_NOMEM on memory exhaustion
+ *
+ * NOTE: if this returns NSERROR_NOMEM then the destination chain will have
+ * some amount of content and should be cleaned up with cert_chain_free.
+ */
+nserror cert_chain_dup_into(const struct cert_chain *src, struct cert_chain *dst);
+
+/**
* duplicate a certificate chain
*
* \param src The certificate chain to copy from