]> git.ipfire.org Git - thirdparty/openssl.git/blame - providers/common/provider_err.c
Adjust some provider reason codes
[thirdparty/openssl.git] / providers / common / provider_err.c
CommitLineData
6caf7f3a
MC
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 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 "internal/providercommonerr.h"
13
14#ifndef OPENSSL_NO_ERR
15
6caf7f3a
MC
16static const ERR_STRING_DATA PROV_str_reasons[] = {
17 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_AES_KEY_SETUP_FAILED),
18 "aes key setup failed"},
19 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_DECRYPT), "bad decrypt"},
20 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_CIPHER_OPERATION_FAILED),
21 "cipher operation failed"},
22 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_GET_PARAMETER),
23 "failed to get parameter"},
24 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_SET_PARAMETER),
25 "failed to set parameter"},
a672a02a 26 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_AAD), "invalid aad"},
55a0a117 27 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CUSTOM_LENGTH),
f73eb733
RL
28 "invalid custom length"},
29 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_IV_LENGTH), "invalid iv length"},
30 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KEY_LENGTH), "invalid key length"},
55a0a117
RL
31 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SALT_LENGTH),
32 "invalid salt length"},
a672a02a 33 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_TAG), "invalid tag"},
55a0a117
RL
34 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_XOF_OR_INVALID_LENGTH),
35 "not xof or invalid length"},
36 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_KEY_SET), "no key set"},
6caf7f3a
MC
37 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_OUTPUT_BUFFER_TOO_SMALL),
38 "output buffer too small"},
39 {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_FINAL_BLOCK_LENGTH),
40 "wrong final block length"},
41 {0, NULL}
42};
43
44#endif
45
46int ERR_load_PROV_strings(void)
47{
48#ifndef OPENSSL_NO_ERR
cbfa5b03 49 if (ERR_func_error_string(PROV_str_reasons[0].error) == NULL)
6caf7f3a 50 ERR_load_strings_const(PROV_str_reasons);
6caf7f3a
MC
51#endif
52 return 1;
53}