Path: blob/main/crypto/openssl/providers/common/provider_err.c
106277 views
/*1* Generated by util/mkerr.pl DO NOT EDIT2* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.3*4* Licensed under the Apache License 2.0 (the "License"). You may not use5* this file except in compliance with the License. You can obtain a copy6* in the file LICENSE in the source distribution or at7* https://www.openssl.org/source/license.html8*/910#include <openssl/err.h>11#include <openssl/proverr.h>12#include "include/prov/proverr.h"1314#ifndef OPENSSL_NO_ERR1516static const ERR_STRING_DATA PROV_str_reasons[] = {17{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ADDITIONAL_INPUT_TOO_LONG),18"additional input too long" },19{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ALGORITHM_MISMATCH),20"algorithm mismatch" },21{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ALREADY_INSTANTIATED),22"already instantiated" },23{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_DECRYPT), "bad decrypt" },24{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_ENCODING), "bad encoding" },25{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_LENGTH), "bad length" },26{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_TLS_CLIENT_VERSION),27"bad tls client version" },28{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BN_ERROR), "bn error" },29{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_CIPHER_OPERATION_FAILED),30"cipher operation failed" },31{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_COFACTOR_REQUIRED), "cofactor required" },32{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_DERIVATION_FUNCTION_INIT_FAILED),33"derivation function init failed" },34{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_DIGEST_NOT_ALLOWED),35"digest not allowed" },36{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_EMS_NOT_ENABLED), "ems not enabled" },37{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ENTROPY_SOURCE_FAILED_CONTINUOUS_TESTS),38"entropy source failed continuous tests" },39{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK),40"entropy source strength too weak" },41{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ERROR_INSTANTIATING_DRBG),42"error instantiating drbg" },43{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ERROR_RETRIEVING_ENTROPY),44"error retrieving entropy" },45{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ERROR_RETRIEVING_NONCE),46"error retrieving nonce" },47{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_DURING_DERIVATION),48"failed during derivation" },49{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_CREATE_LOCK),50"failed to create lock" },51{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_DECRYPT), "failed to decrypt" },52{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_GENERATE_KEY),53"failed to generate key" },54{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_GET_PARAMETER),55"failed to get parameter" },56{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_SET_PARAMETER),57"failed to set parameter" },58{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_SIGN), "failed to sign" },59{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FINAL_CALL_OUT_OF_ORDER),60"final call out of order" },61{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_CONDITIONAL_ERROR),62"fips module conditional error" },63{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_ENTERING_ERROR_STATE),64"fips module entering error state" },65{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_IMPORT_PCT_ERROR),66"fips module import pct error" },67{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_IN_ERROR_STATE),68"fips module in error state" },69{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_GENERATE_ERROR), "generate error" },70{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE),71"illegal or unsupported padding mode" },72{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INDICATOR_INTEGRITY_FAILURE),73"indicator integrity failure" },74{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INIT_CALL_OUT_OF_ORDER),75"init call out of order" },76{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INSUFFICIENT_DRBG_STRENGTH),77"insufficient drbg strength" },78{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_AAD), "invalid aad" },79{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_AEAD), "invalid aead" },80{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CONFIG_DATA),81"invalid config data" },82{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CONSTANT_LENGTH),83"invalid constant length" },84{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CURVE), "invalid curve" },85{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CUSTOM_LENGTH),86"invalid custom length" },87{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DATA), "invalid data" },88{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DIGEST), "invalid digest" },89{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DIGEST_LENGTH),90"invalid digest length" },91{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DIGEST_SIZE),92"invalid digest size" },93{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_EDDSA_INSTANCE_FOR_ATTEMPTED_OPERATION),94"invalid eddsa instance for attempted operation" },95{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_INPUT_LENGTH),96"invalid input length" },97{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_ITERATION_COUNT),98"invalid iteration count" },99{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_IV_LENGTH), "invalid iv length" },100{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KDF), "invalid kdf" },101{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KEY), "invalid key" },102{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KEY_LENGTH),103"invalid key length" },104{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MAC), "invalid mac" },105{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MEMORY_SIZE),106"invalid memory size" },107{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MGF1_MD), "invalid mgf1 md" },108{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MODE), "invalid mode" },109{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_OUTPUT_LENGTH),110"invalid output length" },111{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_PADDING_MODE),112"invalid padding mode" },113{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_PREHASHED_DIGEST_LENGTH),114"invalid prehashed digest length" },115{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_PUBINFO), "invalid pubinfo" },116{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SALT_LENGTH),117"invalid salt length" },118{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SEED_LENGTH),119"invalid seed length" },120{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SIGNATURE_SIZE),121"invalid signature size" },122{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_STATE), "invalid state" },123{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_TAG), "invalid tag" },124{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_TAG_LENGTH),125"invalid tag length" },126{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_THREAD_POOL_SIZE),127"invalid thread pool size" },128{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_UKM_LENGTH),129"invalid ukm length" },130{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_X931_DIGEST),131"invalid x931 digest" },132{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_IN_ERROR_STATE), "in error state" },133{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_KEY_SETUP_FAILED), "key setup failed" },134{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_KEY_SIZE_TOO_SMALL),135"key size too small" },136{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_LENGTH_TOO_LARGE), "length too large" },137{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISMATCHING_DOMAIN_PARAMETERS),138"mismatching domain parameters" },139{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CEK_ALG), "missing cek alg" },140{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CIPHER), "missing cipher" },141{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CONFIG_DATA),142"missing config data" },143{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CONSTANT), "missing constant" },144{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_KEY), "missing key" },145{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_MAC), "missing mac" },146{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_MESSAGE_DIGEST),147"missing message digest" },148{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_OID), "missing OID" },149{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_PASS), "missing pass" },150{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SALT), "missing salt" },151{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SECRET), "missing secret" },152{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SEED), "missing seed" },153{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SESSION_ID),154"missing session id" },155{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_TYPE), "missing type" },156{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_XCGHASH), "missing xcghash" },157{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ML_DSA_NO_FORMAT), "ml dsa no format" },158{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ML_KEM_NO_FORMAT), "ml kem no format" },159{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MODULE_INTEGRITY_FAILURE),160"module integrity failure" },161{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_A_PRIVATE_KEY), "not a private key" },162{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_A_PUBLIC_KEY), "not a public key" },163{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_INSTANTIATED), "not instantiated" },164{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_PARAMETERS), "not parameters" },165{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_SUPPORTED), "not supported" },166{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_XOF_OR_INVALID_LENGTH),167"not xof or invalid length" },168{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_INSTANCE_ALLOWED),169"no instance allowed" },170{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_KEY_SET), "no key set" },171{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_PARAMETERS_SET), "no parameters set" },172{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NULL_LENGTH_POINTER),173"null length pointer" },174{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NULL_OUTPUT_BUFFER),175"null output buffer" },176{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ONESHOT_CALL_OUT_OF_ORDER),177"oneshot call out of order" },178{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE),179"operation not supported for this keytype" },180{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_OUTPUT_BUFFER_TOO_SMALL),181"output buffer too small" },182{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_CANNOT_GENERATE_RANDOM_NUMBERS),183"parent cannot generate random numbers" },184{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_CANNOT_SUPPLY_ENTROPY_SEED),185"parent cannot supply entropy seed" },186{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_LOCKING_NOT_ENABLED),187"parent locking not enabled" },188{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_STRENGTH_TOO_WEAK),189"parent strength too weak" },190{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PATH_MUST_BE_ABSOLUTE),191"path must be absolute" },192{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PERSONALISATION_STRING_TOO_LONG),193"personalisation string too long" },194{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PSS_SALTLEN_TOO_SMALL),195"pss saltlen too small" },196{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_REQUEST_TOO_LARGE_FOR_DRBG),197"request too large for drbg" },198{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_REQUIRE_CTR_MODE_CIPHER),199"require ctr mode cipher" },200{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_RESEED_ERROR), "reseed error" },201{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES),202"search only supported for directories" },203{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT),204"seed sources must not have a parent" },205{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SELF_TEST_KAT_FAILURE),206"self test kat failure" },207{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SELF_TEST_POST_FAILURE),208"self test post failure" },209{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_TAG_NOT_NEEDED), "tag not needed" },210{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_TAG_NOT_SET), "tag not set" },211{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_TOO_MANY_RECORDS), "too many records" },212{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_FIND_CIPHERS),213"unable to find ciphers" },214{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH),215"unable to get parent strength" },216{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_GET_PASSPHRASE),217"unable to get passphrase" },218{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_INITIALISE_CIPHERS),219"unable to initialise ciphers" },220{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_LOAD_SHA256),221"unable to load sha256" },222{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_LOCK_PARENT),223"unable to lock parent" },224{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_RESEED), "unable to reseed" },225{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNEXPECTED_KEY_PARAMETERS),226"unexpected key parameters" },227{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_CEK_ALG),228"unsupported cek alg" },229{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_KEY_SIZE),230"unsupported key size" },231{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_MAC_TYPE),232"unsupported mac type" },233{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_NUMBER_OF_ROUNDS),234"unsupported number of rounds" },235{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_SELECTION),236"unsupported selection" },237{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UPDATE_CALL_OUT_OF_ORDER),238"update call out of order" },239{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_URI_AUTHORITY_UNSUPPORTED),240"uri authority unsupported" },241{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_VALUE_ERROR), "value error" },242{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_CIPHERTEXT_SIZE),243"wrong ciphertext size" },244{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_FINAL_BLOCK_LENGTH),245"wrong final block length" },246{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_OUTPUT_BUFFER_SIZE),247"wrong output buffer size" },248{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_XOF_DIGESTS_NOT_ALLOWED),249"xof digests not allowed" },250{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_XTS_DATA_UNIT_IS_TOO_LARGE),251"xts data unit is too large" },252{ ERR_PACK(ERR_LIB_PROV, 0, PROV_R_XTS_DUPLICATED_KEYS),253"xts duplicated keys" },254{ 0, NULL }255};256257#endif258259int ossl_err_load_PROV_strings(void)260{261#ifndef OPENSSL_NO_ERR262if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)263ERR_load_strings_const(PROV_str_reasons);264#endif265return 1;266}267268269