xref: /openbsd-src/lib/libcrypto/ct/ct_err.c (revision c1ab3fc89e515c43f19943f4026f0b91db90b2f8)
1 /*	$OpenBSD: ct_err.c,v 1.4 2021/12/05 09:37:46 tb Exp $ */
2 /*
3  * Generated by util/mkerr.pl DO NOT EDIT
4  * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
5  *
6  * Licensed under the OpenSSL license (the "License").  You may not use
7  * this file except in compliance with the License.  You can obtain a copy
8  * in the file LICENSE in the source distribution or at
9  * https://www.openssl.org/source/license.html
10  */
11 
12 #include <openssl/err.h>
13 #include <openssl/cterr.h>
14 
15 #ifndef OPENSSL_NO_ERR
16 
17 static ERR_STRING_DATA CT_str_functs[] = {
18 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_NEW, 0), "CTLOG_new"},
19 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_NEW_FROM_BASE64, 0),
20 	 "CTLOG_new_from_base64"},
21 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_NEW_FROM_CONF, 0),
22 	 "ctlog_new_from_conf"},
23 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_STORE_LOAD_CTX_NEW, 0),
24 	 "ctlog_store_load_ctx_new"},
25 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_STORE_LOAD_FILE, 0),
26 	 "CTLOG_STORE_load_file"},
27 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_STORE_LOAD_LOG, 0),
28 	 "ctlog_store_load_log"},
29 	{ERR_PACK(ERR_LIB_CT, CT_F_CTLOG_STORE_NEW, 0), "CTLOG_STORE_new"},
30 	{ERR_PACK(ERR_LIB_CT, CT_F_CT_BASE64_DECODE, 0), "ct_base64_decode"},
31 	{ERR_PACK(ERR_LIB_CT, CT_F_CT_POLICY_EVAL_CTX_NEW, 0),
32 	 "CT_POLICY_EVAL_CTX_new"},
33 	{ERR_PACK(ERR_LIB_CT, CT_F_CT_V1_LOG_ID_FROM_PKEY, 0),
34 	 "ct_v1_log_id_from_pkey"},
35 	{ERR_PACK(ERR_LIB_CT, CT_F_I2O_SCT, 0), "i2o_SCT"},
36 	{ERR_PACK(ERR_LIB_CT, CT_F_I2O_SCT_LIST, 0), "i2o_SCT_LIST"},
37 	{ERR_PACK(ERR_LIB_CT, CT_F_I2O_SCT_SIGNATURE, 0), "i2o_SCT_signature"},
38 	{ERR_PACK(ERR_LIB_CT, CT_F_O2I_SCT, 0), "o2i_SCT"},
39 	{ERR_PACK(ERR_LIB_CT, CT_F_O2I_SCT_LIST, 0), "o2i_SCT_LIST"},
40 	{ERR_PACK(ERR_LIB_CT, CT_F_O2I_SCT_SIGNATURE, 0), "o2i_SCT_signature"},
41 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_CTX_NEW, 0), "SCT_CTX_new"},
42 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_CTX_VERIFY, 0), "SCT_CTX_verify"},
43 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_NEW, 0), "SCT_new"},
44 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_NEW_FROM_BASE64, 0),
45 	 "SCT_new_from_base64"},
46 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET0_LOG_ID, 0), "SCT_set0_log_id"},
47 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET1_EXTENSIONS, 0),
48 	 "SCT_set1_extensions"},
49 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET1_LOG_ID, 0), "SCT_set1_log_id"},
50 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET1_SIGNATURE, 0),
51 	 "SCT_set1_signature"},
52 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET_LOG_ENTRY_TYPE, 0),
53 	 "SCT_set_log_entry_type"},
54 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET_SIGNATURE_NID, 0),
55 	 "SCT_set_signature_nid"},
56 	{ERR_PACK(ERR_LIB_CT, CT_F_SCT_SET_VERSION, 0), "SCT_set_version"},
57 	{0, NULL}
58 };
59 
60 static ERR_STRING_DATA CT_str_reasons[] = {
61 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_BASE64_DECODE_ERROR),
62 	 "base64 decode error"},
63 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_INVALID_LOG_ID_LENGTH),
64 	 "invalid log id length"},
65 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_INVALID), "log conf invalid"},
66 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_INVALID_KEY),
67 	 "log conf invalid key"},
68 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_MISSING_DESCRIPTION),
69 	 "log conf missing description"},
70 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_MISSING_KEY),
71 	 "log conf missing key"},
72 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_KEY_INVALID), "log key invalid"},
73 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_FUTURE_TIMESTAMP),
74 	 "sct future timestamp"},
75 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_INVALID), "sct invalid"},
76 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_INVALID_SIGNATURE),
77 	 "sct invalid signature"},
78 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_LIST_INVALID), "sct list invalid"},
79 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_LOG_ID_MISMATCH),
80 	 "sct log id mismatch"},
81 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_NOT_SET), "sct not set"},
82 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_UNSUPPORTED_VERSION),
83 	 "sct unsupported version"},
84 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_UNRECOGNIZED_SIGNATURE_NID),
85 	 "unrecognized signature nid"},
86 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_UNSUPPORTED_ENTRY_TYPE),
87 	 "unsupported entry type"},
88 	{ERR_PACK(ERR_LIB_CT, 0, CT_R_UNSUPPORTED_VERSION),
89 	 "unsupported version"},
90 	{0, NULL}
91 };
92 
93 #endif
94 
95 int
96 ERR_load_CT_strings(void)
97 {
98 	if (ERR_func_error_string(CT_str_functs[0].error) == NULL) {
99 		ERR_load_strings(0, CT_str_functs);
100 		ERR_load_strings(0, CT_str_reasons);
101 	}
102 	return 1;
103 }
104