2nd chunk: CRMF code (crypto/crmf/, ) and its integration
[openssl.git] / crypto / crmf / crmf_err.c
1 /*
2  * Generated by util/mkerr.pl DO NOT EDIT
3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
4  *
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
9  */
10
11 #include <openssl/err.h>
12 #include <openssl/crmferr.h>
13
14 #ifndef OPENSSL_NO_ERR
15
16 static const ERR_STRING_DATA CRMF_str_functs[] = {
17     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_CRMF_POPOSIGNINGKEY_INIT, 0),
18      "CRMF_poposigningkey_init"},
19     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_CERTID_GEN, 0),
20      "OSSL_CRMF_CERTID_gen"},
21     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_CERTTEMPLATE_FILL, 0),
22      "OSSL_CRMF_CERTTEMPLATE_fill"},
23     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_ENCRYPTEDVALUE_GET1_ENCCERT, 0),
24      "OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert"},
25     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSGS_VERIFY_POPO, 0),
26      "OSSL_CRMF_MSGS_verify_popo"},
27     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_CREATE_POPO, 0),
28      "OSSL_CRMF_MSG_create_popo"},
29     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_GET0_TMPL, 0),
30      "OSSL_CRMF_MSG_get0_tmpl"},
31     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_GET_CERTREQID, 0),
32      "OSSL_CRMF_MSG_get_certReqId"},
33     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_PKIPUBLICATIONINFO_PUSH0_SINGLEPUBINFO, 0),
34      "OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo"},
35     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_PUSH0_EXTENSION, 0),
36      "OSSL_CRMF_MSG_push0_extension"},
37     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_PUSH0_REGCTRL, 0),
38      "OSSL_CRMF_MSG_push0_regCtrl"},
39     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_PUSH0_REGINFO, 0),
40      "OSSL_CRMF_MSG_push0_regInfo"},
41     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_SET0_EXTENSIONS, 0),
42      "OSSL_CRMF_MSG_set0_extensions"},
43     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_SET0_SINGLEPUBINFO, 0),
44      "OSSL_CRMF_MSG_set0_SinglePubInfo"},
45     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_SET_CERTREQID, 0),
46      "OSSL_CRMF_MSG_set_certReqId"},
47     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_SET_PKIPUBLICATIONINFO_ACTION, 0),
48      "OSSL_CRMF_MSG_set_PKIPublicationInfo_action"},
49     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_MSG_SET_VALIDITY, 0),
50      "OSSL_CRMF_MSG_set_validity"},
51     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_PBMP_NEW, 0),
52      "OSSL_CRMF_pbmp_new"},
53     {ERR_PACK(ERR_LIB_CRMF, CRMF_F_OSSL_CRMF_PBM_NEW, 0), "OSSL_CRMF_pbm_new"},
54     {0, NULL}
55 };
56
57 static const ERR_STRING_DATA CRMF_str_reasons[] = {
58     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_BAD_PBM_ITERATIONCOUNT),
59     "bad pbm iterationcount"},
60     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_CRMFERROR), "crmferror"},
61     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_ERROR), "error"},
62     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_ERROR_DECODING_CERTIFICATE),
63     "error decoding certificate"},
64     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_ERROR_DECRYPTING_CERTIFICATE),
65     "error decrypting certificate"},
66     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_ERROR_DECRYPTING_SYMMETRIC_KEY),
67     "error decrypting symmetric key"},
68     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_FAILURE_OBTAINING_RANDOM),
69     "failure obtaining random"},
70     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_ITERATIONCOUNT_BELOW_100),
71     "iterationcount below 100"},
72     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_MALFORMED_IV), "malformed iv"},
73     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_NULL_ARGUMENT), "null argument"},
74     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_SETTING_MAC_ALGOR_FAILURE),
75     "setting mac algor failure"},
76     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_SETTING_OWF_ALGOR_FAILURE),
77     "setting owf algor failure"},
78     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_UNSUPPORTED_ALGORITHM),
79     "unsupported algorithm"},
80     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_UNSUPPORTED_ALG_FOR_POPSIGNINGKEY),
81     "unsupported alg for popsigningkey"},
82     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_UNSUPPORTED_CIPHER),
83     "unsupported cipher"},
84     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_UNSUPPORTED_METHOD_FOR_CREATING_POPO),
85     "unsupported method for creating popo"},
86     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_UNSUPPORTED_POPO_METHOD),
87     "unsupported popo method"},
88     {ERR_PACK(ERR_LIB_CRMF, 0, CRMF_R_UNSUPPORTED_POPO_NOT_ACCEPTED),
89     "unsupported popo not accepted"},
90     {0, NULL}
91 };
92
93 #endif
94
95 int ERR_load_CRMF_strings(void)
96 {
97 #ifndef OPENSSL_NO_ERR
98     if (ERR_func_error_string(CRMF_str_functs[0].error) == NULL) {
99         ERR_load_strings_const(CRMF_str_functs);
100         ERR_load_strings_const(CRMF_str_reasons);
101     }
102 #endif
103     return 1;
104 }