xref: /third_party/openssl/crypto/ct/ct_err.c (revision e1051a39)
1e1051a39Sopenharmony_ci/*
2e1051a39Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT
3e1051a39Sopenharmony_ci * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4e1051a39Sopenharmony_ci *
5e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
6e1051a39Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
7e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at
8e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html
9e1051a39Sopenharmony_ci */
10e1051a39Sopenharmony_ci
11e1051a39Sopenharmony_ci#include <openssl/err.h>
12e1051a39Sopenharmony_ci#include <openssl/cterr.h>
13e1051a39Sopenharmony_ci#include "crypto/cterr.h"
14e1051a39Sopenharmony_ci
15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_CT
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR
18e1051a39Sopenharmony_ci
19e1051a39Sopenharmony_cistatic const ERR_STRING_DATA CT_str_reasons[] = {
20e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_BASE64_DECODE_ERROR), "base64 decode error"},
21e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_INVALID_LOG_ID_LENGTH),
22e1051a39Sopenharmony_ci    "invalid log id length"},
23e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_INVALID), "log conf invalid"},
24e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_INVALID_KEY),
25e1051a39Sopenharmony_ci    "log conf invalid key"},
26e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_MISSING_DESCRIPTION),
27e1051a39Sopenharmony_ci    "log conf missing description"},
28e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_CONF_MISSING_KEY),
29e1051a39Sopenharmony_ci    "log conf missing key"},
30e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_LOG_KEY_INVALID), "log key invalid"},
31e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_FUTURE_TIMESTAMP),
32e1051a39Sopenharmony_ci    "sct future timestamp"},
33e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_INVALID), "sct invalid"},
34e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_INVALID_SIGNATURE),
35e1051a39Sopenharmony_ci    "sct invalid signature"},
36e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_LIST_INVALID), "sct list invalid"},
37e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_LOG_ID_MISMATCH), "sct log id mismatch"},
38e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_NOT_SET), "sct not set"},
39e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_SCT_UNSUPPORTED_VERSION),
40e1051a39Sopenharmony_ci    "sct unsupported version"},
41e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_UNRECOGNIZED_SIGNATURE_NID),
42e1051a39Sopenharmony_ci    "unrecognized signature nid"},
43e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_UNSUPPORTED_ENTRY_TYPE),
44e1051a39Sopenharmony_ci    "unsupported entry type"},
45e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_CT, 0, CT_R_UNSUPPORTED_VERSION), "unsupported version"},
46e1051a39Sopenharmony_ci    {0, NULL}
47e1051a39Sopenharmony_ci};
48e1051a39Sopenharmony_ci
49e1051a39Sopenharmony_ci# endif
50e1051a39Sopenharmony_ci
51e1051a39Sopenharmony_ciint ossl_err_load_CT_strings(void)
52e1051a39Sopenharmony_ci{
53e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR
54e1051a39Sopenharmony_ci    if (ERR_reason_error_string(CT_str_reasons[0].error) == NULL)
55e1051a39Sopenharmony_ci        ERR_load_strings_const(CT_str_reasons);
56e1051a39Sopenharmony_ci# endif
57e1051a39Sopenharmony_ci    return 1;
58e1051a39Sopenharmony_ci}
59e1051a39Sopenharmony_ci#else
60e1051a39Sopenharmony_ciNON_EMPTY_TRANSLATION_UNIT
61e1051a39Sopenharmony_ci#endif
62