evp_err.c 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*
  2. * Generated by util/mkerr.pl DO NOT EDIT
  3. * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
  4. *
  5. * Licensed under the OpenSSL license (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. #include <stdio.h>
  11. #include <openssl/err.h>
  12. #include <openssl/evp.h>
  13. /* BEGIN ERROR CODES */
  14. #ifndef OPENSSL_NO_ERR
  15. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_EVP,func,0)
  16. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_EVP,0,reason)
  17. static ERR_STRING_DATA EVP_str_functs[] = {
  18. {ERR_FUNC(EVP_F_AESNI_INIT_KEY), "aesni_init_key"},
  19. {ERR_FUNC(EVP_F_AES_INIT_KEY), "aes_init_key"},
  20. {ERR_FUNC(EVP_F_AES_OCB_CIPHER), "aes_ocb_cipher"},
  21. {ERR_FUNC(EVP_F_AES_T4_INIT_KEY), "aes_t4_init_key"},
  22. {ERR_FUNC(EVP_F_AES_WRAP_CIPHER), "aes_wrap_cipher"},
  23. {ERR_FUNC(EVP_F_ALG_MODULE_INIT), "alg_module_init"},
  24. {ERR_FUNC(EVP_F_ARIA_INIT_KEY), "aria_init_key"},
  25. {ERR_FUNC(EVP_F_CAMELLIA_INIT_KEY), "camellia_init_key"},
  26. {ERR_FUNC(EVP_F_CHACHA20_POLY1305_CTRL), "chacha20_poly1305_ctrl"},
  27. {ERR_FUNC(EVP_F_CMLL_T4_INIT_KEY), "cmll_t4_init_key"},
  28. {ERR_FUNC(EVP_F_DES_EDE3_WRAP_CIPHER), "des_ede3_wrap_cipher"},
  29. {ERR_FUNC(EVP_F_DO_SIGVER_INIT), "do_sigver_init"},
  30. {ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX), "EVP_CipherInit_ex"},
  31. {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_COPY), "EVP_CIPHER_CTX_copy"},
  32. {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"},
  33. {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH),
  34. "EVP_CIPHER_CTX_set_key_length"},
  35. {ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"},
  36. {ERR_FUNC(EVP_F_EVP_DECRYPTUPDATE), "EVP_DecryptUpdate"},
  37. {ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"},
  38. {ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"},
  39. {ERR_FUNC(EVP_F_EVP_ENCRYPTUPDATE), "EVP_EncryptUpdate"},
  40. {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"},
  41. {ERR_FUNC(EVP_F_EVP_MD_SIZE), "EVP_MD_size"},
  42. {ERR_FUNC(EVP_F_EVP_OPENINIT), "EVP_OpenInit"},
  43. {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD), "EVP_PBE_alg_add"},
  44. {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD_TYPE), "EVP_PBE_alg_add_type"},
  45. {ERR_FUNC(EVP_F_EVP_PBE_CIPHERINIT), "EVP_PBE_CipherInit"},
  46. {ERR_FUNC(EVP_F_EVP_PBE_SCRYPT), "EVP_PBE_scrypt"},
  47. {ERR_FUNC(EVP_F_EVP_PKCS82PKEY), "EVP_PKCS82PKEY"},
  48. {ERR_FUNC(EVP_F_EVP_PKEY2PKCS8), "EVP_PKEY2PKCS8"},
  49. {ERR_FUNC(EVP_F_EVP_PKEY_COPY_PARAMETERS), "EVP_PKEY_copy_parameters"},
  50. {ERR_FUNC(EVP_F_EVP_PKEY_CTX_CTRL), "EVP_PKEY_CTX_ctrl"},
  51. {ERR_FUNC(EVP_F_EVP_PKEY_CTX_CTRL_STR), "EVP_PKEY_CTX_ctrl_str"},
  52. {ERR_FUNC(EVP_F_EVP_PKEY_CTX_DUP), "EVP_PKEY_CTX_dup"},
  53. {ERR_FUNC(EVP_F_EVP_PKEY_CTX_MD), "EVP_PKEY_CTX_md"},
  54. {ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT), "EVP_PKEY_decrypt"},
  55. {ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT_INIT), "EVP_PKEY_decrypt_init"},
  56. {ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT_OLD), "EVP_PKEY_decrypt_old"},
  57. {ERR_FUNC(EVP_F_EVP_PKEY_DERIVE), "EVP_PKEY_derive"},
  58. {ERR_FUNC(EVP_F_EVP_PKEY_DERIVE_INIT), "EVP_PKEY_derive_init"},
  59. {ERR_FUNC(EVP_F_EVP_PKEY_DERIVE_SET_PEER), "EVP_PKEY_derive_set_peer"},
  60. {ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT), "EVP_PKEY_encrypt"},
  61. {ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT_INIT), "EVP_PKEY_encrypt_init"},
  62. {ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT_OLD), "EVP_PKEY_encrypt_old"},
  63. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_DH), "EVP_PKEY_get0_DH"},
  64. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_DSA), "EVP_PKEY_get0_DSA"},
  65. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_EC_KEY), "EVP_PKEY_get0_EC_KEY"},
  66. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_HMAC), "EVP_PKEY_get0_hmac"},
  67. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_POLY1305), "EVP_PKEY_get0_poly1305"},
  68. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_RSA), "EVP_PKEY_get0_RSA"},
  69. {ERR_FUNC(EVP_F_EVP_PKEY_GET0_SIPHASH), "EVP_PKEY_get0_siphash"},
  70. {ERR_FUNC(EVP_F_EVP_PKEY_KEYGEN), "EVP_PKEY_keygen"},
  71. {ERR_FUNC(EVP_F_EVP_PKEY_KEYGEN_INIT), "EVP_PKEY_keygen_init"},
  72. {ERR_FUNC(EVP_F_EVP_PKEY_NEW), "EVP_PKEY_new"},
  73. {ERR_FUNC(EVP_F_EVP_PKEY_PARAMGEN), "EVP_PKEY_paramgen"},
  74. {ERR_FUNC(EVP_F_EVP_PKEY_PARAMGEN_INIT), "EVP_PKEY_paramgen_init"},
  75. {ERR_FUNC(EVP_F_EVP_PKEY_SIGN), "EVP_PKEY_sign"},
  76. {ERR_FUNC(EVP_F_EVP_PKEY_SIGN_INIT), "EVP_PKEY_sign_init"},
  77. {ERR_FUNC(EVP_F_EVP_PKEY_VERIFY), "EVP_PKEY_verify"},
  78. {ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_INIT), "EVP_PKEY_verify_init"},
  79. {ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_RECOVER), "EVP_PKEY_verify_recover"},
  80. {ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT),
  81. "EVP_PKEY_verify_recover_init"},
  82. {ERR_FUNC(EVP_F_EVP_SIGNFINAL), "EVP_SignFinal"},
  83. {ERR_FUNC(EVP_F_EVP_VERIFYFINAL), "EVP_VerifyFinal"},
  84. {ERR_FUNC(EVP_F_INT_CTX_NEW), "int_ctx_new"},
  85. {ERR_FUNC(EVP_F_PKCS5_PBE_KEYIVGEN), "PKCS5_PBE_keyivgen"},
  86. {ERR_FUNC(EVP_F_PKCS5_V2_PBE_KEYIVGEN), "PKCS5_v2_PBE_keyivgen"},
  87. {ERR_FUNC(EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN), "PKCS5_v2_PBKDF2_keyivgen"},
  88. {ERR_FUNC(EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN), "PKCS5_v2_scrypt_keyivgen"},
  89. {ERR_FUNC(EVP_F_PKEY_SET_TYPE), "pkey_set_type"},
  90. {ERR_FUNC(EVP_F_RC2_MAGIC_TO_METH), "rc2_magic_to_meth"},
  91. {ERR_FUNC(EVP_F_RC5_CTRL), "rc5_ctrl"},
  92. {0, NULL}
  93. };
  94. static ERR_STRING_DATA EVP_str_reasons[] = {
  95. {ERR_REASON(EVP_R_AES_KEY_SETUP_FAILED), "aes key setup failed"},
  96. {ERR_REASON(EVP_R_ARIA_KEY_SETUP_FAILED), "aria key setup failed"},
  97. {ERR_REASON(EVP_R_BAD_DECRYPT), "bad decrypt"},
  98. {ERR_REASON(EVP_R_BUFFER_TOO_SMALL), "buffer too small"},
  99. {ERR_REASON(EVP_R_CAMELLIA_KEY_SETUP_FAILED),
  100. "camellia key setup failed"},
  101. {ERR_REASON(EVP_R_CIPHER_PARAMETER_ERROR), "cipher parameter error"},
  102. {ERR_REASON(EVP_R_COMMAND_NOT_SUPPORTED), "command not supported"},
  103. {ERR_REASON(EVP_R_COPY_ERROR), "copy error"},
  104. {ERR_REASON(EVP_R_CTRL_NOT_IMPLEMENTED), "ctrl not implemented"},
  105. {ERR_REASON(EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED),
  106. "ctrl operation not implemented"},
  107. {ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),
  108. "data not multiple of block length"},
  109. {ERR_REASON(EVP_R_DECODE_ERROR), "decode error"},
  110. {ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES), "different key types"},
  111. {ERR_REASON(EVP_R_DIFFERENT_PARAMETERS), "different parameters"},
  112. {ERR_REASON(EVP_R_ERROR_LOADING_SECTION), "error loading section"},
  113. {ERR_REASON(EVP_R_ERROR_SETTING_FIPS_MODE), "error setting fips mode"},
  114. {ERR_REASON(EVP_R_EXPECTING_AN_HMAC_KEY), "expecting an hmac key"},
  115. {ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY), "expecting an rsa key"},
  116. {ERR_REASON(EVP_R_EXPECTING_A_DH_KEY), "expecting a dh key"},
  117. {ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY), "expecting a dsa key"},
  118. {ERR_REASON(EVP_R_EXPECTING_A_EC_KEY), "expecting a ec key"},
  119. {ERR_REASON(EVP_R_EXPECTING_A_POLY1305_KEY), "expecting a poly1305 key"},
  120. {ERR_REASON(EVP_R_EXPECTING_A_SIPHASH_KEY), "expecting a siphash key"},
  121. {ERR_REASON(EVP_R_FIPS_MODE_NOT_SUPPORTED), "fips mode not supported"},
  122. {ERR_REASON(EVP_R_ILLEGAL_SCRYPT_PARAMETERS),
  123. "illegal scrypt parameters"},
  124. {ERR_REASON(EVP_R_INITIALIZATION_ERROR), "initialization error"},
  125. {ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED), "input not initialized"},
  126. {ERR_REASON(EVP_R_INVALID_DIGEST), "invalid digest"},
  127. {ERR_REASON(EVP_R_INVALID_FIPS_MODE), "invalid fips mode"},
  128. {ERR_REASON(EVP_R_INVALID_KEY), "invalid key"},
  129. {ERR_REASON(EVP_R_INVALID_KEY_LENGTH), "invalid key length"},
  130. {ERR_REASON(EVP_R_INVALID_OPERATION), "invalid operation"},
  131. {ERR_REASON(EVP_R_KEYGEN_FAILURE), "keygen failure"},
  132. {ERR_REASON(EVP_R_MEMORY_LIMIT_EXCEEDED), "memory limit exceeded"},
  133. {ERR_REASON(EVP_R_MESSAGE_DIGEST_IS_NULL), "message digest is null"},
  134. {ERR_REASON(EVP_R_METHOD_NOT_SUPPORTED), "method not supported"},
  135. {ERR_REASON(EVP_R_MISSING_PARAMETERS), "missing parameters"},
  136. {ERR_REASON(EVP_R_NO_CIPHER_SET), "no cipher set"},
  137. {ERR_REASON(EVP_R_NO_DEFAULT_DIGEST), "no default digest"},
  138. {ERR_REASON(EVP_R_NO_DIGEST_SET), "no digest set"},
  139. {ERR_REASON(EVP_R_NO_KEY_SET), "no key set"},
  140. {ERR_REASON(EVP_R_NO_OPERATION_SET), "no operation set"},
  141. {ERR_REASON(EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE),
  142. "operation not supported for this keytype"},
  143. {ERR_REASON(EVP_R_OPERATON_NOT_INITIALIZED), "operaton not initialized"},
  144. {ERR_REASON(EVP_R_PARTIALLY_OVERLAPPING),
  145. "partially overlapping buffers"},
  146. {ERR_REASON(EVP_R_PRIVATE_KEY_DECODE_ERROR), "private key decode error"},
  147. {ERR_REASON(EVP_R_PRIVATE_KEY_ENCODE_ERROR), "private key encode error"},
  148. {ERR_REASON(EVP_R_PUBLIC_KEY_NOT_RSA), "public key not rsa"},
  149. {ERR_REASON(EVP_R_UNKNOWN_CIPHER), "unknown cipher"},
  150. {ERR_REASON(EVP_R_UNKNOWN_DIGEST), "unknown digest"},
  151. {ERR_REASON(EVP_R_UNKNOWN_OPTION), "unknown option"},
  152. {ERR_REASON(EVP_R_UNKNOWN_PBE_ALGORITHM), "unknown pbe algorithm"},
  153. {ERR_REASON(EVP_R_UNSUPPORTED_ALGORITHM), "unsupported algorithm"},
  154. {ERR_REASON(EVP_R_UNSUPPORTED_CIPHER), "unsupported cipher"},
  155. {ERR_REASON(EVP_R_UNSUPPORTED_KEYLENGTH), "unsupported keylength"},
  156. {ERR_REASON(EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION),
  157. "unsupported key derivation function"},
  158. {ERR_REASON(EVP_R_UNSUPPORTED_KEY_SIZE), "unsupported key size"},
  159. {ERR_REASON(EVP_R_UNSUPPORTED_NUMBER_OF_ROUNDS),
  160. "unsupported number of rounds"},
  161. {ERR_REASON(EVP_R_UNSUPPORTED_PRF), "unsupported prf"},
  162. {ERR_REASON(EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM),
  163. "unsupported private key algorithm"},
  164. {ERR_REASON(EVP_R_UNSUPPORTED_SALT_TYPE), "unsupported salt type"},
  165. {ERR_REASON(EVP_R_WRAP_MODE_NOT_ALLOWED), "wrap mode not allowed"},
  166. {ERR_REASON(EVP_R_WRONG_FINAL_BLOCK_LENGTH), "wrong final block length"},
  167. {0, NULL}
  168. };
  169. #endif
  170. int ERR_load_EVP_strings(void)
  171. {
  172. #ifndef OPENSSL_NO_ERR
  173. if (ERR_func_error_string(EVP_str_functs[0].error) == NULL) {
  174. ERR_load_strings(0, EVP_str_functs);
  175. ERR_load_strings(0, EVP_str_reasons);
  176. }
  177. #endif
  178. return 1;
  179. }