6 Encapsulates the data required to evaluate whether SCTs meet a Certificate Transparency policy
10 #include <openssl/ct.h>
12 CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
13 void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
14 X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
15 void CT_POLICY_EVAL_CTX_set0_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
16 X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
17 void CT_POLICY_EVAL_CTX_set0_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
18 const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
19 void CT_POLICY_EVAL_CTX_set0_log_store(CT_POLICY_EVAL_CTX *ctx, CTLOG_STORE *log_store);
23 A B<CT_POLICY_EVAL_CTX> is used by functions that evaluate whether Signed
24 Certificate Timestamps (SCTs) fulfil a Certificate Transparency (CT) policy.
25 This policy may be, for example, that at least one valid SCT is available. To
26 determine this, an SCT's signature must be verified. This requires:
30 =item * the public key of the log that issued the SCT
32 =item * the certificate that the SCT was issued for
34 =item * the issuer certificate (if the SCT was issued for a pre-certificate)
38 The above requirements are met using the setters described below.
40 B<CT_POLICY_EVAL_CTX_new>() creates an empty policy evaluation context. This
41 should then be populated using:
45 =item * B<CT_POLICY_EVAL_CTX_set0_cert>() to provide the certificate the SCTs were issued for
47 =item * B<CT_POLICY_EVAL_CTX_set0_issuer>() to provide the issuer certificate
49 =item * B<CT_POLICY_EVAL_CTX_set0_log_store>() to provide a list of logs that are trusted as sources of SCTs
53 None of these setters take ownership of the pointers passed to them.
54 Each setter has a matching getter for accessing the current value.
55 The getters do not transfer ownership either.
57 When no longer required, the B<CT_POLICY_EVAL_CTX> should be passed to
58 B<CT_POLICY_EVAL_CTX_free>() to delete it.
62 The issuer certificate only needs to be provided if at least one of the SCTs
63 was issued for a pre-certificate. This will be the case for SCTs embedded in a
64 certificate (i.e. those in an X.509 extension), but may not be the case for SCTs
65 found in the TLS SCT extension or OCSP response.
69 B<CT_POLICY_EVAL_CTX_new>() will return NULL if malloc fails.
77 Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
79 Licensed under the OpenSSL license (the "License"). You may not use
80 this file except in compliance with the License. You can obtain a copy
81 in the file LICENSE in the source distribution or at
82 L<https://www.openssl.org/source/license.html>.