Skip to content
Snippets Groups Projects
Commit 67e66898 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

For testing: add a tor_x509_cert_dup().

parent 88c2a6b9
No related branches found
No related tags found
No related merge requests found
......@@ -683,6 +683,13 @@ MOCK_IMPL(STATIC tor_x509_cert_t *,
return cert;
}
/** Return a copy of <b>cert</b> */
tor_x509_cert_t *
tor_x509_cert_dup(const tor_x509_cert_t *cert)
{
return tor_x509_cert_new(X509_dup(cert->cert));
}
/** Read a DER-encoded X509 cert, of length exactly <b>certificate_len</b>,
* from a <b>certificate</b>. Return a newly allocated tor_x509_cert_t on
* success and NULL on failure. */
......
......@@ -176,6 +176,7 @@ extern uint64_t total_bytes_written_by_tls;
#endif /* endif TORTLS_PRIVATE */
tor_x509_cert_t *tor_x509_cert_dup(const tor_x509_cert_t *cert);
const char *tor_tls_err_to_string(int err);
void tor_tls_get_state_description(tor_tls_t *tls, char *buf, size_t sz);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment