Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
ct.h File Reference
#include <openssl/opensslconf.h>
#include <openssl/ossl_typ.h>
#include <openssl/safestack.h>
#include <openssl/x509.h>
#include <openssl/cterr.h>
+ Include dependency graph for ct.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SCT_MIN_RSA_BITS   2048
 
#define CT_V1_HASHLEN   SHA256_DIGEST_LENGTH
 

Enumerations

enum  ct_log_entry_type_t { CT_LOG_ENTRY_TYPE_NOT_SET = -1 , CT_LOG_ENTRY_TYPE_X509 = 0 , CT_LOG_ENTRY_TYPE_PRECERT = 1 }
 
enum  sct_version_t { SCT_VERSION_NOT_SET = -1 , SCT_VERSION_V1 = 0 }
 
enum  sct_source_t { SCT_SOURCE_UNKNOWN , SCT_SOURCE_TLS_EXTENSION , SCT_SOURCE_X509V3_EXTENSION , SCT_SOURCE_OCSP_STAPLED_RESPONSE }
 
enum  sct_validation_status_t {
  SCT_VALIDATION_STATUS_NOT_SET , SCT_VALIDATION_STATUS_UNKNOWN_LOG , SCT_VALIDATION_STATUS_VALID , SCT_VALIDATION_STATUS_INVALID ,
  SCT_VALIDATION_STATUS_UNVERIFIED , SCT_VALIDATION_STATUS_UNKNOWN_VERSION
}
 

Functions

CT_POLICY_EVAL_CTXCT_POLICY_EVAL_CTX_new (void)
 
void CT_POLICY_EVAL_CTX_free (CT_POLICY_EVAL_CTX *ctx)
 
X509CT_POLICY_EVAL_CTX_get0_cert (const CT_POLICY_EVAL_CTX *ctx)
 
int CT_POLICY_EVAL_CTX_set1_cert (CT_POLICY_EVAL_CTX *ctx, X509 *cert)
 
X509CT_POLICY_EVAL_CTX_get0_issuer (const CT_POLICY_EVAL_CTX *ctx)
 
int CT_POLICY_EVAL_CTX_set1_issuer (CT_POLICY_EVAL_CTX *ctx, X509 *issuer)
 
const CTLOG_STORECT_POLICY_EVAL_CTX_get0_log_store (const CT_POLICY_EVAL_CTX *ctx)
 
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE (CT_POLICY_EVAL_CTX *ctx, CTLOG_STORE *log_store)
 
uint64_t CT_POLICY_EVAL_CTX_get_time (const CT_POLICY_EVAL_CTX *ctx)
 
void CT_POLICY_EVAL_CTX_set_time (CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms)
 
SCTSCT_new (void)
 
SCTSCT_new_from_base64 (unsigned char version, const char *logid_base64, ct_log_entry_type_t entry_type, uint64_t timestamp, const char *extensions_base64, const char *signature_base64)
 
void SCT_free (SCT *sct)
 
void SCT_LIST_free (STACK_OF(SCT) *a)
 
sct_version_t SCT_get_version (const SCT *sct)
 
__owur int SCT_set_version (SCT *sct, sct_version_t version)
 
ct_log_entry_type_t SCT_get_log_entry_type (const SCT *sct)
 
__owur int SCT_set_log_entry_type (SCT *sct, ct_log_entry_type_t entry_type)
 
size_t SCT_get0_log_id (const SCT *sct, unsigned char **log_id)
 
__owur int SCT_set0_log_id (SCT *sct, unsigned char *log_id, size_t log_id_len)
 
__owur int SCT_set1_log_id (SCT *sct, const unsigned char *log_id, size_t log_id_len)
 
uint64_t SCT_get_timestamp (const SCT *sct)
 
void SCT_set_timestamp (SCT *sct, uint64_t timestamp)
 
int SCT_get_signature_nid (const SCT *sct)
 
__owur int SCT_set_signature_nid (SCT *sct, int nid)
 
size_t SCT_get0_extensions (const SCT *sct, unsigned char **ext)
 
void SCT_set0_extensions (SCT *sct, unsigned char *ext, size_t ext_len)
 
__owur int SCT_set1_extensions (SCT *sct, const unsigned char *ext, size_t ext_len)
 
size_t SCT_get0_signature (const SCT *sct, unsigned char **sig)
 
void SCT_set0_signature (SCT *sct, unsigned char *sig, size_t sig_len)
 
__owur int SCT_set1_signature (SCT *sct, const unsigned char *sig, size_t sig_len)
 
sct_source_t SCT_get_source (const SCT *sct)
 
__owur int SCT_set_source (SCT *sct, sct_source_t source)
 
const char * SCT_validation_status_string (const SCT *sct)
 
void SCT_print (const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs)
 
void SCT_LIST_print (const STACK_OF(SCT) *sct_list, BIO *out, int indent, const char *separator, const CTLOG_STORE *logs)
 
sct_validation_status_t SCT_get_validation_status (const SCT *sct)
 
__owur int SCT_validate (SCT *sct, const CT_POLICY_EVAL_CTX *ctx)
 
__owur int SCT_LIST_validate (const STACK_OF(SCT) *scts, CT_POLICY_EVAL_CTX *ctx)
 
__owur int i2o_SCT_LIST (const STACK_OF(SCT) *a, unsigned char **pp)
 
 STACK_OF (SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a
 
__owur int i2d_SCT_LIST (const STACK_OF(SCT) *a, unsigned char **pp)
 
__owur int i2o_SCT (const SCT *sct, unsigned char **out)
 
SCTo2i_SCT (SCT **psct, const unsigned char **in, size_t len)
 
CTLOGCTLOG_new (EVP_PKEY *public_key, const char *name)
 
int CTLOG_new_from_base64 (CTLOG **ct_log, const char *pkey_base64, const char *name)
 
void CTLOG_free (CTLOG *log)
 
const char * CTLOG_get0_name (const CTLOG *log)
 
void CTLOG_get0_log_id (const CTLOG *log, const uint8_t **log_id, size_t *log_id_len)
 
EVP_PKEYCTLOG_get0_public_key (const CTLOG *log)
 
CTLOG_STORECTLOG_STORE_new (void)
 
void CTLOG_STORE_free (CTLOG_STORE *store)
 
const CTLOGCTLOG_STORE_get0_log_by_id (const CTLOG_STORE *store, const uint8_t *log_id, size_t log_id_len)
 
__owur int CTLOG_STORE_load_file (CTLOG_STORE *store, const char *file)
 
__owur int CTLOG_STORE_load_default_file (CTLOG_STORE *store)
 

Variables

const unsigned char ** pp
 
const unsigned char size_t len
 

Macro Definition Documentation

◆ CT_V1_HASHLEN

#define CT_V1_HASHLEN   SHA256_DIGEST_LENGTH

Definition at line 29 of file ct.h.

◆ SCT_MIN_RSA_BITS

#define SCT_MIN_RSA_BITS   2048

Definition at line 26 of file ct.h.

Enumeration Type Documentation

◆ ct_log_entry_type_t

Enumerator
CT_LOG_ENTRY_TYPE_NOT_SET 
CT_LOG_ENTRY_TYPE_X509 
CT_LOG_ENTRY_TYPE_PRECERT 

Definition at line 31 of file ct.h.

◆ sct_source_t

Enumerator
SCT_SOURCE_UNKNOWN 
SCT_SOURCE_TLS_EXTENSION 
SCT_SOURCE_X509V3_EXTENSION 
SCT_SOURCE_OCSP_STAPLED_RESPONSE 

Definition at line 42 of file ct.h.

◆ sct_validation_status_t

Enumerator
SCT_VALIDATION_STATUS_NOT_SET 
SCT_VALIDATION_STATUS_UNKNOWN_LOG 
SCT_VALIDATION_STATUS_VALID 
SCT_VALIDATION_STATUS_INVALID 
SCT_VALIDATION_STATUS_UNVERIFIED 
SCT_VALIDATION_STATUS_UNKNOWN_VERSION 

Definition at line 49 of file ct.h.

◆ sct_version_t

Enumerator
SCT_VERSION_NOT_SET 
SCT_VERSION_V1 

Definition at line 37 of file ct.h.

Function Documentation

◆ CT_POLICY_EVAL_CTX_free()

void CT_POLICY_EVAL_CTX_free ( CT_POLICY_EVAL_CTX * ctx)

◆ CT_POLICY_EVAL_CTX_get0_cert()

X509 * CT_POLICY_EVAL_CTX_get0_cert ( const CT_POLICY_EVAL_CTX * ctx)

◆ CT_POLICY_EVAL_CTX_get0_issuer()

X509 * CT_POLICY_EVAL_CTX_get0_issuer ( const CT_POLICY_EVAL_CTX * ctx)

◆ CT_POLICY_EVAL_CTX_get0_log_store()

const CTLOG_STORE * CT_POLICY_EVAL_CTX_get0_log_store ( const CT_POLICY_EVAL_CTX * ctx)

◆ CT_POLICY_EVAL_CTX_get_time()

uint64_t CT_POLICY_EVAL_CTX_get_time ( const CT_POLICY_EVAL_CTX * ctx)

◆ CT_POLICY_EVAL_CTX_new()

CT_POLICY_EVAL_CTX * CT_POLICY_EVAL_CTX_new ( void )

◆ CT_POLICY_EVAL_CTX_set1_cert()

int CT_POLICY_EVAL_CTX_set1_cert ( CT_POLICY_EVAL_CTX * ctx,
X509 * cert )

◆ CT_POLICY_EVAL_CTX_set1_issuer()

int CT_POLICY_EVAL_CTX_set1_issuer ( CT_POLICY_EVAL_CTX * ctx,
X509 * issuer )

◆ CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE()

void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE ( CT_POLICY_EVAL_CTX * ctx,
CTLOG_STORE * log_store )

◆ CT_POLICY_EVAL_CTX_set_time()

void CT_POLICY_EVAL_CTX_set_time ( CT_POLICY_EVAL_CTX * ctx,
uint64_t time_in_ms )

◆ CTLOG_free()

void CTLOG_free ( CTLOG * log)

◆ CTLOG_get0_log_id()

void CTLOG_get0_log_id ( const CTLOG * log,
const uint8_t ** log_id,
size_t * log_id_len )

◆ CTLOG_get0_name()

const char * CTLOG_get0_name ( const CTLOG * log)

◆ CTLOG_get0_public_key()

EVP_PKEY * CTLOG_get0_public_key ( const CTLOG * log)

◆ CTLOG_new()

CTLOG * CTLOG_new ( EVP_PKEY * public_key,
const char * name )

◆ CTLOG_new_from_base64()

int CTLOG_new_from_base64 ( CTLOG ** ct_log,
const char * pkey_base64,
const char * name )

◆ CTLOG_STORE_free()

void CTLOG_STORE_free ( CTLOG_STORE * store)

◆ CTLOG_STORE_get0_log_by_id()

const CTLOG * CTLOG_STORE_get0_log_by_id ( const CTLOG_STORE * store,
const uint8_t * log_id,
size_t log_id_len )

◆ CTLOG_STORE_load_default_file()

__owur int CTLOG_STORE_load_default_file ( CTLOG_STORE * store)

◆ CTLOG_STORE_load_file()

__owur int CTLOG_STORE_load_file ( CTLOG_STORE * store,
const char * file )

◆ CTLOG_STORE_new()

CTLOG_STORE * CTLOG_STORE_new ( void )

◆ i2d_SCT_LIST()

__owur int i2d_SCT_LIST ( const STACK_OF(SCT) * a,
unsigned char ** pp )

◆ i2o_SCT()

__owur int i2o_SCT ( const SCT * sct,
unsigned char ** out )

◆ i2o_SCT_LIST()

__owur int i2o_SCT_LIST ( const STACK_OF(SCT) * a,
unsigned char ** pp )

◆ o2i_SCT()

SCT * o2i_SCT ( SCT ** psct,
const unsigned char ** in,
size_t len )

◆ SCT_free()

void SCT_free ( SCT * sct)

◆ SCT_get0_extensions()

size_t SCT_get0_extensions ( const SCT * sct,
unsigned char ** ext )

◆ SCT_get0_log_id()

size_t SCT_get0_log_id ( const SCT * sct,
unsigned char ** log_id )

◆ SCT_get0_signature()

size_t SCT_get0_signature ( const SCT * sct,
unsigned char ** sig )

◆ SCT_get_log_entry_type()

ct_log_entry_type_t SCT_get_log_entry_type ( const SCT * sct)

◆ SCT_get_signature_nid()

int SCT_get_signature_nid ( const SCT * sct)

◆ SCT_get_source()

sct_source_t SCT_get_source ( const SCT * sct)

◆ SCT_get_timestamp()

uint64_t SCT_get_timestamp ( const SCT * sct)

◆ SCT_get_validation_status()

sct_validation_status_t SCT_get_validation_status ( const SCT * sct)

◆ SCT_get_version()

sct_version_t SCT_get_version ( const SCT * sct)

◆ SCT_LIST_free()

void SCT_LIST_free ( STACK_OF(SCT) * a)

◆ SCT_LIST_print()

void SCT_LIST_print ( const STACK_OF(SCT) * sct_list,
BIO * out,
int indent,
const char * separator,
const CTLOG_STORE * logs )

◆ SCT_LIST_validate()

__owur int SCT_LIST_validate ( const STACK_OF(SCT) * scts,
CT_POLICY_EVAL_CTX * ctx )

◆ SCT_new()

SCT * SCT_new ( void )

◆ SCT_new_from_base64()

SCT * SCT_new_from_base64 ( unsigned char version,
const char * logid_base64,
ct_log_entry_type_t entry_type,
uint64_t timestamp,
const char * extensions_base64,
const char * signature_base64 )

◆ SCT_print()

void SCT_print ( const SCT * sct,
BIO * out,
int indent,
const CTLOG_STORE * logs )

◆ SCT_set0_extensions()

void SCT_set0_extensions ( SCT * sct,
unsigned char * ext,
size_t ext_len )

◆ SCT_set0_log_id()

__owur int SCT_set0_log_id ( SCT * sct,
unsigned char * log_id,
size_t log_id_len )

◆ SCT_set0_signature()

void SCT_set0_signature ( SCT * sct,
unsigned char * sig,
size_t sig_len )

◆ SCT_set1_extensions()

__owur int SCT_set1_extensions ( SCT * sct,
const unsigned char * ext,
size_t ext_len )

◆ SCT_set1_log_id()

__owur int SCT_set1_log_id ( SCT * sct,
const unsigned char * log_id,
size_t log_id_len )

◆ SCT_set1_signature()

__owur int SCT_set1_signature ( SCT * sct,
const unsigned char * sig,
size_t sig_len )

◆ SCT_set_log_entry_type()

__owur int SCT_set_log_entry_type ( SCT * sct,
ct_log_entry_type_t entry_type )

◆ SCT_set_signature_nid()

__owur int SCT_set_signature_nid ( SCT * sct,
int nid )

◆ SCT_set_source()

__owur int SCT_set_source ( SCT * sct,
sct_source_t source )

◆ SCT_set_timestamp()

void SCT_set_timestamp ( SCT * sct,
uint64_t timestamp )

◆ SCT_set_version()

__owur int SCT_set_version ( SCT * sct,
sct_version_t version )

◆ SCT_validate()

__owur int SCT_validate ( SCT * sct,
const CT_POLICY_EVAL_CTX * ctx )

◆ SCT_validation_status_string()

const char * SCT_validation_status_string ( const SCT * sct)

◆ STACK_OF()

STACK_OF ( SCT )

Variable Documentation

◆ len

const char int const unsigned char int len

Definition at line 348 of file ct.h.

◆ pp

const unsigned char ** pp

Definition at line 347 of file ct.h.