cpt_err.c 1.9 KB
Newer Older
1
/*
R
Rich Salz 已提交
2
 * Generated by util/mkerr.pl DO NOT EDIT
3
 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4
 *
5 6 7 8
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.openssl.org/source/license.html
9 10
 */

11
#include <stdio.h>
12 13
#include <openssl/err.h>
#include <openssl/crypto.h>
14 15

/* BEGIN ERROR CODES */
16
#ifndef OPENSSL_NO_ERR
D
Dr. Stephen Henson 已提交
17

18 19
# define ERR_FUNC(func) ERR_PACK(ERR_LIB_CRYPTO,func,0)
# define ERR_REASON(reason) ERR_PACK(ERR_LIB_CRYPTO,0,reason)
D
Dr. Stephen Henson 已提交
20

21
static ERR_STRING_DATA CRYPTO_str_functs[] = {
R
Rich Salz 已提交
22 23
    {ERR_FUNC(CRYPTO_F_CRYPTO_DUP_EX_DATA), "CRYPTO_dup_ex_data"},
    {ERR_FUNC(CRYPTO_F_CRYPTO_FREE_EX_DATA), "CRYPTO_free_ex_data"},
24
    {ERR_FUNC(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX), "CRYPTO_get_ex_new_index"},
R
Rich Salz 已提交
25
    {ERR_FUNC(CRYPTO_F_CRYPTO_MEMDUP), "CRYPTO_memdup"},
R
Rich Salz 已提交
26
    {ERR_FUNC(CRYPTO_F_CRYPTO_NEW_EX_DATA), "CRYPTO_new_ex_data"},
27 28
    {ERR_FUNC(CRYPTO_F_CRYPTO_SET_EX_DATA), "CRYPTO_set_ex_data"},
    {ERR_FUNC(CRYPTO_F_FIPS_MODE_SET), "FIPS_mode_set"},
29
    {ERR_FUNC(CRYPTO_F_GET_AND_LOCK), "get_and_lock"},
30 31
    {ERR_FUNC(CRYPTO_F_OPENSSL_BUF2HEXSTR), "OPENSSL_buf2hexstr"},
    {ERR_FUNC(CRYPTO_F_OPENSSL_HEXSTR2BUF), "OPENSSL_hexstr2buf"},
R
Rich Salz 已提交
32
    {ERR_FUNC(CRYPTO_F_OPENSSL_INIT_CRYPTO), "OPENSSL_init_crypto"},
33 34
    {0, NULL}
};
35

36 37
static ERR_STRING_DATA CRYPTO_str_reasons[] = {
    {ERR_REASON(CRYPTO_R_FIPS_MODE_NOT_SUPPORTED), "fips mode not supported"},
38 39
    {ERR_REASON(CRYPTO_R_ILLEGAL_HEX_DIGIT), "illegal hex digit"},
    {ERR_REASON(CRYPTO_R_ODD_NUMBER_OF_DIGITS), "odd number of digits"},
40 41
    {0, NULL}
};
42 43 44

#endif

U
Ulf Möller 已提交
45
void ERR_load_CRYPTO_strings(void)
46
{
47
#ifndef OPENSSL_NO_ERR
48

49 50 51 52
    if (ERR_func_error_string(CRYPTO_str_functs[0].error) == NULL) {
        ERR_load_strings(0, CRYPTO_str_functs);
        ERR_load_strings(0, CRYPTO_str_reasons);
    }
53
#endif
54
}