Coverage Report

Created: 2026-07-12 07:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl35/crypto/x509/x509_err.c
Line
Count
Source
1
/*
2
 * Generated by util/mkerr.pl DO NOT EDIT
3
 * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
4
 *
5
 * Licensed under the Apache License 2.0 (the "License").  You may not use
6
 * this file except in compliance with the License.  You can obtain a copy
7
 * in the file LICENSE in the source distribution or at
8
 * https://www.openssl.org/source/license.html
9
 */
10
11
#include <openssl/err.h>
12
#include <openssl/x509err.h>
13
#include "crypto/x509err.h"
14
15
#ifndef OPENSSL_NO_ERR
16
17
static const ERR_STRING_DATA X509_str_reasons[] = {
18
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_AKID_MISMATCH), "akid mismatch" },
19
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_BAD_SELECTOR), "bad selector" },
20
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_BAD_X509_FILETYPE), "bad x509 filetype" },
21
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_BASE64_DECODE_ERROR),
22
        "base64 decode error" },
23
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_CANT_CHECK_DH_KEY), "can't check dh key" },
24
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_CERTIFICATE_VERIFICATION_FAILED),
25
        "certificate verification failed" },
26
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_CERT_ALREADY_IN_HASH_TABLE),
27
        "cert already in hash table" },
28
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_ALREADY_DELTA), "crl already delta" },
29
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_SIGNATURE_ALGORITHM_MISMATCH),
30
        "crl signature algorithm mismatch" },
31
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_VERIFY_FAILURE),
32
        "crl verify failure" },
33
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_DUPLICATE_ATTRIBUTE),
34
        "duplicate attribute" },
35
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_ERROR_GETTING_MD_BY_NID),
36
        "error getting md by nid" },
37
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_ERROR_USING_SIGINF_SET),
38
        "error using siginf set" },
39
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_IDP_MISMATCH), "idp mismatch" },
40
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_ATTRIBUTES),
41
        "invalid attributes" },
42
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_DIRECTORY), "invalid directory" },
43
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_DISTPOINT), "invalid distpoint" },
44
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_FIELD_NAME),
45
        "invalid field name" },
46
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_TRUST), "invalid trust" },
47
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_ISSUER_MISMATCH), "issuer mismatch" },
48
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_KEY_TYPE_MISMATCH), "key type mismatch" },
49
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_KEY_VALUES_MISMATCH),
50
        "key values mismatch" },
51
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_LOADING_CERT_DIR), "loading cert dir" },
52
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_LOADING_DEFAULTS), "loading defaults" },
53
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_METHOD_NOT_SUPPORTED),
54
        "method not supported" },
55
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NAME_TOO_LONG), "name too long" },
56
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NEWER_CRL_NOT_NEWER),
57
        "newer crl not newer" },
58
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERTIFICATE_FOUND),
59
        "no certificate found" },
60
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERTIFICATE_OR_CRL_FOUND),
61
        "no certificate or crl found" },
62
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERT_SET_FOR_US_TO_VERIFY),
63
        "no cert set for us to verify" },
64
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CRL_FOUND), "no crl found" },
65
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CRL_NUMBER), "no crl number" },
66
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_PUBLIC_KEY_DECODE_ERROR),
67
        "public key decode error" },
68
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_PUBLIC_KEY_ENCODE_ERROR),
69
        "public key encode error" },
70
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_SHOULD_RETRY), "should retry" },
71
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN),
72
        "unable to find parameters in chain" },
73
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY),
74
        "unable to get certs public key" },
75
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_KEY_TYPE), "unknown key type" },
76
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_NID), "unknown nid" },
77
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_PURPOSE_ID),
78
        "unknown purpose id" },
79
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_SIGID_ALGS),
80
        "unknown sigid algs" },
81
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_TRUST_ID), "unknown trust id" },
82
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNSUPPORTED_ALGORITHM),
83
        "unsupported algorithm" },
84
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_UNSUPPORTED_VERSION),
85
        "unsupported version" },
86
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_WRONG_LOOKUP_TYPE), "wrong lookup type" },
87
    { ERR_PACK(ERR_LIB_X509, 0, X509_R_WRONG_TYPE), "wrong type" },
88
    { 0, NULL }
89
};
90
91
#endif
92
93
int ossl_err_load_X509_strings(void)
94
274
{
95
274
#ifndef OPENSSL_NO_ERR
96
274
    if (ERR_reason_error_string(X509_str_reasons[0].error) == NULL)
97
274
        ERR_load_strings_const(X509_str_reasons);
98
274
#endif
99
274
    return 1;
100
274
}