| 
									
										
										
										
											2016-05-18 05:38:18 +08:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2016-05-24 03:02:34 +08:00
										 |  |  |  * Generated by util/mkerr.pl DO NOT EDIT | 
					
						
							| 
									
										
										
										
											2020-02-18 02:25:55 +08:00
										 |  |  |  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. | 
					
						
							| 
									
										
										
										
											2000-01-14 04:59:17 +08:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2018-12-06 20:52:15 +08:00
										 |  |  |  * Licensed under the Apache License 2.0 (the "License").  You may not use | 
					
						
							| 
									
										
										
										
											2016-05-18 05:38:18 +08:00
										 |  |  |  * 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
 | 
					
						
							| 
									
										
										
										
											2000-01-14 04:59:17 +08:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <openssl/err.h>
 | 
					
						
							| 
									
										
										
										
											2017-06-08 03:12:03 +08:00
										 |  |  | #include <openssl/randerr.h>
 | 
					
						
							| 
									
										
										
										
											2020-11-12 17:36:47 +08:00
										 |  |  | #include "crypto/randerr.h"
 | 
					
						
							| 
									
										
										
										
											2000-01-14 04:59:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-02-20 00:06:34 +08:00
										 |  |  | #ifndef OPENSSL_NO_ERR
 | 
					
						
							| 
									
										
										
										
											2005-04-13 00:15:22 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-08 03:12:03 +08:00
										 |  |  | static const ERR_STRING_DATA RAND_str_reasons[] = { | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ADDITIONAL_INPUT_TOO_LONG), | 
					
						
							|  |  |  |     "additional input too long"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ALREADY_INSTANTIATED), | 
					
						
							|  |  |  |     "already instantiated"}, | 
					
						
							| 
									
										
										
										
											2017-09-01 05:16:22 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ARGUMENT_OUT_OF_RANGE), | 
					
						
							|  |  |  |     "argument out of range"}, | 
					
						
							| 
									
										
										
										
											2017-07-06 04:08:19 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_CANNOT_OPEN_FILE), "Cannot open file"}, | 
					
						
							| 
									
										
										
										
											2019-04-11 06:52:22 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_DERIVATION_FUNCTION_MANDATORY_FOR_FIPS), | 
					
						
							|  |  |  |     "derivation function mandatory for fips"}, | 
					
						
							| 
									
										
										
										
											2018-02-08 23:40:32 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_DRBG_ALREADY_INITIALIZED), | 
					
						
							|  |  |  |     "drbg already initialized"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_DRBG_NOT_INITIALISED), | 
					
						
							|  |  |  |     "drbg not initialised"}, | 
					
						
							| 
									
										
										
										
											2017-09-01 05:16:22 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ENTROPY_INPUT_TOO_LONG), | 
					
						
							|  |  |  |     "entropy input too long"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ENTROPY_OUT_OF_RANGE), | 
					
						
							|  |  |  |     "entropy out of range"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_ENTROPY_POOL_WAS_IGNORED), | 
					
						
							|  |  |  |     "error entropy pool was ignored"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_INITIALISING_DRBG), | 
					
						
							|  |  |  |     "error initialising drbg"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_INSTANTIATING_DRBG), | 
					
						
							|  |  |  |     "error instantiating drbg"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_RETRIEVING_ADDITIONAL_INPUT), | 
					
						
							|  |  |  |     "error retrieving additional input"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_RETRIEVING_ENTROPY), | 
					
						
							|  |  |  |     "error retrieving entropy"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_ERROR_RETRIEVING_NONCE), | 
					
						
							|  |  |  |     "error retrieving nonce"}, | 
					
						
							| 
									
										
										
										
											2017-09-01 05:16:22 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FAILED_TO_CREATE_LOCK), | 
					
						
							|  |  |  |     "failed to create lock"}, | 
					
						
							| 
									
										
										
										
											2017-06-20 00:58:06 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FUNC_NOT_IMPLEMENTED), | 
					
						
							|  |  |  |     "Function not implemented"}, | 
					
						
							| 
									
										
										
										
											2017-07-06 04:08:19 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_FWRITE_ERROR), "Error writing file"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_GENERATE_ERROR), "generate error"}, | 
					
						
							| 
									
										
										
										
											2020-04-30 12:46:12 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_INSUFFICIENT_DRBG_STRENGTH), | 
					
						
							|  |  |  |     "insufficient drbg strength"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_INTERNAL_ERROR), "internal error"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_IN_ERROR_STATE), "in error state"}, | 
					
						
							| 
									
										
										
										
											2017-07-06 04:08:19 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_NOT_A_REGULAR_FILE), | 
					
						
							|  |  |  |     "Not a regular file"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_NOT_INSTANTIATED), "not instantiated"}, | 
					
						
							| 
									
										
										
										
											2017-12-29 04:42:14 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED), | 
					
						
							|  |  |  |     "no drbg implementation selected"}, | 
					
						
							| 
									
										
										
										
											2018-02-08 23:40:32 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PARENT_LOCKING_NOT_ENABLED), | 
					
						
							|  |  |  |     "parent locking not enabled"}, | 
					
						
							| 
									
										
										
										
											2018-03-04 20:23:05 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PARENT_STRENGTH_TOO_WEAK), | 
					
						
							|  |  |  |     "parent strength too weak"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PERSONALISATION_STRING_TOO_LONG), | 
					
						
							|  |  |  |     "personalisation string too long"}, | 
					
						
							| 
									
										
										
										
											2018-02-19 03:55:28 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED), | 
					
						
							|  |  |  |     "prediction resistance not supported"}, | 
					
						
							| 
									
										
										
										
											2017-06-08 03:12:03 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_PRNG_NOT_SEEDED), "PRNG not seeded"}, | 
					
						
							| 
									
										
										
										
											2017-09-01 05:16:22 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RANDOM_POOL_OVERFLOW), | 
					
						
							|  |  |  |     "random pool overflow"}, | 
					
						
							| 
									
										
										
										
											2018-04-03 22:33:55 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RANDOM_POOL_UNDERFLOW), | 
					
						
							|  |  |  |     "random pool underflow"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_REQUEST_TOO_LARGE_FOR_DRBG), | 
					
						
							|  |  |  |     "request too large for drbg"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_RESEED_ERROR), "reseed error"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_SELFTEST_FAILURE), "selftest failure"}, | 
					
						
							| 
									
										
										
										
											2018-04-13 22:23:58 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_TOO_LITTLE_NONCE_REQUESTED), | 
					
						
							|  |  |  |     "too little nonce requested"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_TOO_MUCH_NONCE_REQUESTED), | 
					
						
							|  |  |  |     "too much nonce requested"}, | 
					
						
							| 
									
										
										
										
											2020-07-22 10:55:31 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_CREATE_DRBG), | 
					
						
							|  |  |  |     "unable to create drbg"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_FETCH_DRBG), | 
					
						
							|  |  |  |     "unable to fetch drbg"}, | 
					
						
							| 
									
										
										
										
											2020-04-30 12:46:12 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_GET_PARENT_RESEED_PROP_COUNTER), | 
					
						
							|  |  |  |     "unable to get parent reseed prop counter"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_GET_PARENT_STRENGTH), | 
					
						
							|  |  |  |     "unable to get parent strength"}, | 
					
						
							|  |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNABLE_TO_LOCK_PARENT), | 
					
						
							|  |  |  |     "unable to lock parent"}, | 
					
						
							| 
									
										
										
										
											2018-03-16 02:48:43 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNSUPPORTED_DRBG_FLAGS), | 
					
						
							|  |  |  |     "unsupported drbg flags"}, | 
					
						
							| 
									
										
										
										
											2017-06-28 00:04:37 +08:00
										 |  |  |     {ERR_PACK(ERR_LIB_RAND, 0, RAND_R_UNSUPPORTED_DRBG_TYPE), | 
					
						
							|  |  |  |     "unsupported drbg type"}, | 
					
						
							| 
									
										
										
										
											2015-01-22 11:40:55 +08:00
										 |  |  |     {0, NULL} | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2000-01-14 04:59:17 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-25 10:04:22 +08:00
										 |  |  | int ossl_err_load_RAND_strings(void) | 
					
						
							| 
									
										
										
										
											2015-01-22 11:40:55 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2006-11-22 05:29:44 +08:00
										 |  |  | #ifndef OPENSSL_NO_ERR
 | 
					
						
							| 
									
										
										
										
											2019-09-05 03:45:56 +08:00
										 |  |  |     if (ERR_reason_error_string(RAND_str_reasons[0].error) == NULL) | 
					
						
							| 
									
										
										
										
											2017-06-08 03:12:03 +08:00
										 |  |  |         ERR_load_strings_const(RAND_str_reasons); | 
					
						
							| 
									
										
										
										
											2006-11-22 05:29:44 +08:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2016-07-12 21:50:06 +08:00
										 |  |  |     return 1; | 
					
						
							| 
									
										
										
										
											2015-01-22 11:40:55 +08:00
										 |  |  | } |