1 | /*
|
---|
2 | * Generated by util/mkerr.pl DO NOT EDIT
|
---|
3 | * Copyright 1995-2023 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/randerr.h>
|
---|
13 | #include "crypto/randerr.h"
|
---|
14 |
|
---|
15 | #ifndef OPENSSL_NO_ERR
|
---|
16 |
|
---|
17 | static const ERR_STRING_DATA RAND_str_reasons[] = {
|
---|
18 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ADDITIONAL_INPUT_TOO_LONG),
|
---|
19 | "additional input too long"},
|
---|
20 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ALREADY_INSTANTIATED),
|
---|
21 | "already instantiated"},
|
---|
22 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ARGUMENT_OUT_OF_RANGE),
|
---|
23 | "argument out of range"},
|
---|
24 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_CANNOT_OPEN_FILE), "Cannot open file"},
|
---|
25 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_DRBG_ALREADY_INITIALIZED),
|
---|
26 | "drbg already initialized"},
|
---|
27 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_DRBG_NOT_INITIALISED),
|
---|
28 | "drbg not initialised"},
|
---|
29 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ENTROPY_INPUT_TOO_LONG),
|
---|
30 | "entropy input too long"},
|
---|
31 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ENTROPY_OUT_OF_RANGE),
|
---|
32 | "entropy out of range"},
|
---|
33 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_ENTROPY_POOL_WAS_IGNORED),
|
---|
34 | "error entropy pool was ignored"},
|
---|
35 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_INITIALISING_DRBG),
|
---|
36 | "error initialising drbg"},
|
---|
37 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_INSTANTIATING_DRBG),
|
---|
38 | "error instantiating drbg"},
|
---|
39 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_RETRIEVING_ADDITIONAL_INPUT),
|
---|
40 | "error retrieving additional input"},
|
---|
41 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_RETRIEVING_ENTROPY),
|
---|
42 | "error retrieving entropy"},
|
---|
43 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_RETRIEVING_NONCE),
|
---|
44 | "error retrieving nonce"},
|
---|
45 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FAILED_TO_CREATE_LOCK),
|
---|
46 | "failed to create lock"},
|
---|
47 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FUNC_NOT_IMPLEMENTED),
|
---|
48 | "Function not implemented"},
|
---|
49 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FWRITE_ERROR), "Error writing file"},
|
---|
50 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_GENERATE_ERROR), "generate error"},
|
---|
51 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_INSUFFICIENT_DRBG_STRENGTH),
|
---|
52 | "insufficient drbg strength"},
|
---|
53 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_INTERNAL_ERROR), "internal error"},
|
---|
54 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_INVALID_PROPERTY_QUERY),
|
---|
55 | "invalid property query"},
|
---|
56 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_IN_ERROR_STATE), "in error state"},
|
---|
57 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_NOT_A_REGULAR_FILE),
|
---|
58 | "Not a regular file"},
|
---|
59 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_NOT_INSTANTIATED), "not instantiated"},
|
---|
60 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED),
|
---|
61 | "no drbg implementation selected"},
|
---|
62 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PARENT_LOCKING_NOT_ENABLED),
|
---|
63 | "parent locking not enabled"},
|
---|
64 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PARENT_STRENGTH_TOO_WEAK),
|
---|
65 | "parent strength too weak"},
|
---|
66 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PERSONALISATION_STRING_TOO_LONG),
|
---|
67 | "personalisation string too long"},
|
---|
68 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED),
|
---|
69 | "prediction resistance not supported"},
|
---|
70 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PRNG_NOT_SEEDED), "PRNG not seeded"},
|
---|
71 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RANDOM_POOL_OVERFLOW),
|
---|
72 | "random pool overflow"},
|
---|
73 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RANDOM_POOL_UNDERFLOW),
|
---|
74 | "random pool underflow"},
|
---|
75 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_REQUEST_TOO_LARGE_FOR_DRBG),
|
---|
76 | "request too large for drbg"},
|
---|
77 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RESEED_ERROR), "reseed error"},
|
---|
78 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_SELFTEST_FAILURE), "selftest failure"},
|
---|
79 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_TOO_LITTLE_NONCE_REQUESTED),
|
---|
80 | "too little nonce requested"},
|
---|
81 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_TOO_MUCH_NONCE_REQUESTED),
|
---|
82 | "too much nonce requested"},
|
---|
83 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_CREATE_DRBG),
|
---|
84 | "unable to create drbg"},
|
---|
85 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_FETCH_DRBG),
|
---|
86 | "unable to fetch drbg"},
|
---|
87 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_GET_PARENT_RESEED_PROP_COUNTER),
|
---|
88 | "unable to get parent reseed prop counter"},
|
---|
89 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_GET_PARENT_STRENGTH),
|
---|
90 | "unable to get parent strength"},
|
---|
91 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_LOCK_PARENT),
|
---|
92 | "unable to lock parent"},
|
---|
93 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNSUPPORTED_DRBG_FLAGS),
|
---|
94 | "unsupported drbg flags"},
|
---|
95 | {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNSUPPORTED_DRBG_TYPE),
|
---|
96 | "unsupported drbg type"},
|
---|
97 | {0, NULL}
|
---|
98 | };
|
---|
99 |
|
---|
100 | #endif
|
---|
101 |
|
---|
102 | int ossl_err_load_RAND_strings(void)
|
---|
103 | {
|
---|
104 | #ifndef OPENSSL_NO_ERR
|
---|
105 | if (ERR_reason_error_string(RAND_str_reasons[0].error) == NULL)
|
---|
106 | ERR_load_strings_const(RAND_str_reasons);
|
---|
107 | #endif
|
---|
108 | return 1;
|
---|
109 | }
|
---|