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