diff options
author | Rob Percival <robpercival@google.com> | 2016-08-05 14:17:31 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-08-15 12:56:47 -0400 |
commit | a1bb7708cec057fe07d987398015c01e6090891f (patch) | |
tree | f13433af758a9c80517a8c8bd3ffbb102d96d242 /include/openssl/ct.h | |
parent | a0ef6bb6874ea362ef78e0df1435212383df4774 (diff) | |
download | openssl-a1bb7708cec057fe07d987398015c01e6090891f.tar.gz |
Improves CTLOG_STORE setters
Changes them to have clearer ownership semantics, as suggested in
https://github.com/openssl/openssl/pull/1372#discussion_r73232196.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1408)
Diffstat (limited to 'include/openssl/ct.h')
-rw-r--r-- | include/openssl/ct.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/openssl/ct.h b/include/openssl/ct.h index 07068af2be..52ea6a269a 100644 --- a/include/openssl/ct.h +++ b/include/openssl/ct.h @@ -64,27 +64,27 @@ DEFINE_STACK_OF(CTLOG) /* Creates a new, empty policy evaluation context */ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void); -/* Deletes a policy evaluation context */ +/* Deletes a policy evaluation context and anything it owns. */ void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx); /* Gets the peer certificate that the SCTs are for */ X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx); /* Sets the certificate associated with the received SCTs */ -void CT_POLICY_EVAL_CTX_set0_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert); +void CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert); /* Gets the issuer of the aforementioned certificate */ X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx); /* Sets the issuer of the certificate associated with the received SCTs */ -void CT_POLICY_EVAL_CTX_set0_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer); +void CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer); /* Gets the CT logs that are trusted sources of SCTs */ const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx); -/* Sets the log store that is in use */ -void CT_POLICY_EVAL_CTX_set0_log_store(CT_POLICY_EVAL_CTX *ctx, - CTLOG_STORE *log_store); +/* Sets the log store that is in use. It must outlive the CT_POLICY_EVAL_CTX. */ +void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx, + CTLOG_STORE *log_store); /***************** * SCT functions * |