]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/cpt_err.c
Avoid SEGV when giving X509_sign a NULL private key.
[thirdparty/openssl.git] / crypto / cpt_err.c
CommitLineData
b6cff313 1/*
0cd0a820 2 * Generated by util/mkerr.pl DO NOT EDIT
cdb10bae 3 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
6d311938 4 *
b6cff313
RS
5 * Licensed under the OpenSSL license (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
6d311938
DSH
9 */
10
ec577822 11#include <openssl/err.h>
52df25cf 12#include <openssl/cryptoerr.h>
58964a49 13
cf1b7d96 14#ifndef OPENSSL_NO_ERR
29dc3508 15
52df25cf 16static const ERR_STRING_DATA CRYPTO_str_functs[] = {
7de2b9c4 17 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CMAC_CTX_NEW, 0), "CMAC_CTX_new"},
52df25cf
RS
18 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_DUP_EX_DATA, 0),
19 "CRYPTO_dup_ex_data"},
20 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_FREE_EX_DATA, 0),
21 "CRYPTO_free_ex_data"},
22 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX, 0),
23 "CRYPTO_get_ex_new_index"},
24 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_MEMDUP, 0), "CRYPTO_memdup"},
25 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_NEW_EX_DATA, 0),
26 "CRYPTO_new_ex_data"},
7de2b9c4
RS
27 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_OCB128_COPY_CTX, 0),
28 "CRYPTO_ocb128_copy_ctx"},
29 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_OCB128_INIT, 0),
30 "CRYPTO_ocb128_init"},
52df25cf
RS
31 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_CRYPTO_SET_EX_DATA, 0),
32 "CRYPTO_set_ex_data"},
33 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_FIPS_MODE_SET, 0), "FIPS_mode_set"},
34 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_GET_AND_LOCK, 0), "get_and_lock"},
cdb10bae 35 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_ATEXIT, 0), "OPENSSL_atexit"},
52df25cf
RS
36 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_BUF2HEXSTR, 0),
37 "OPENSSL_buf2hexstr"},
cdb10bae 38 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_FOPEN, 0), "openssl_fopen"},
52df25cf
RS
39 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_HEXSTR2BUF, 0),
40 "OPENSSL_hexstr2buf"},
41 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_INIT_CRYPTO, 0),
42 "OPENSSL_init_crypto"},
fe1128dc
RS
43 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_LH_NEW, 0), "OPENSSL_LH_new"},
44 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_SK_DEEP_COPY, 0),
45 "OPENSSL_sk_deep_copy"},
46 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_SK_DUP, 0), "OPENSSL_sk_dup"},
7de2b9c4
RS
47 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_HMAC_INIT, 0), "pkey_hmac_init"},
48 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_POLY1305_INIT, 0),
49 "pkey_poly1305_init"},
50 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_PKEY_SIPHASH_INIT, 0),
51 "pkey_siphash_init"},
fe1128dc 52 {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_SK_RESERVE, 0), "sk_reserve"},
0f113f3e
MC
53 {0, NULL}
54};
6d311938 55
52df25cf
RS
56static const ERR_STRING_DATA CRYPTO_str_reasons[] = {
57 {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_FIPS_MODE_NOT_SUPPORTED),
58 "fips mode not supported"},
59 {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_ILLEGAL_HEX_DIGIT),
60 "illegal hex digit"},
61 {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_ODD_NUMBER_OF_DIGITS),
62 "odd number of digits"},
0f113f3e
MC
63 {0, NULL}
64};
58964a49
RE
65
66#endif
67
69588edb 68int ERR_load_CRYPTO_strings(void)
0f113f3e 69{
47a9d527 70#ifndef OPENSSL_NO_ERR
0f113f3e 71 if (ERR_func_error_string(CRYPTO_str_functs[0].error) == NULL) {
52df25cf
RS
72 ERR_load_strings_const(CRYPTO_str_functs);
73 ERR_load_strings_const(CRYPTO_str_reasons);
0f113f3e 74 }
47a9d527 75#endif
69588edb 76 return 1;
0f113f3e 77}