A local copy of OpenSSL from GitHub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
9.2 KiB

  1. /*
  2. * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the OpenSSL license (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. /*
  10. * NOTE: this file was auto generated by the mkerr.pl script: any changes
  11. * made to it will be overwritten when the script next updates this file,
  12. * only reason strings will be preserved.
  13. */
  14. #include <stdio.h>
  15. #include <openssl/err.h>
  16. #include <openssl/fips.h>
  17. /* BEGIN ERROR CODES */
  18. #ifndef OPENSSL_NO_ERR
  19. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_FIPS,func,0)
  20. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_FIPS,0,reason)
  21. static ERR_STRING_DATA FIPS_str_functs[] = {
  22. {ERR_FUNC(FIPS_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"},
  23. {ERR_FUNC(FIPS_F_DH_INIT), "DH_INIT"},
  24. {ERR_FUNC(FIPS_F_DRBG_RESEED), "DRBG_RESEED"},
  25. {ERR_FUNC(FIPS_F_DSA_BUILTIN_PARAMGEN), "DSA_BUILTIN_PARAMGEN"},
  26. {ERR_FUNC(FIPS_F_DSA_BUILTIN_PARAMGEN2), "DSA_BUILTIN_PARAMGEN2"},
  27. {ERR_FUNC(FIPS_F_DSA_DO_SIGN), "DSA_do_sign"},
  28. {ERR_FUNC(FIPS_F_DSA_DO_VERIFY), "DSA_do_verify"},
  29. {ERR_FUNC(FIPS_F_ECDH_COMPUTE_KEY), "ECDH_compute_key"},
  30. {ERR_FUNC(FIPS_F_ECDSA_DO_SIGN), "ECDSA_do_sign"},
  31. {ERR_FUNC(FIPS_F_ECDSA_DO_VERIFY), "ECDSA_do_verify"},
  32. {ERR_FUNC(FIPS_F_EC_KEY_GENERATE_KEY), "EC_KEY_generate_key"},
  33. {ERR_FUNC(FIPS_F_FIPS_CHECK_DSA), "FIPS_CHECK_DSA"},
  34. {ERR_FUNC(FIPS_F_FIPS_CHECK_DSA_PRNG), "fips_check_dsa_prng"},
  35. {ERR_FUNC(FIPS_F_FIPS_CHECK_EC), "FIPS_CHECK_EC"},
  36. {ERR_FUNC(FIPS_F_FIPS_CHECK_EC_PRNG), "fips_check_ec_prng"},
  37. {ERR_FUNC(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT),
  38. "FIPS_check_incore_fingerprint"},
  39. {ERR_FUNC(FIPS_F_FIPS_CHECK_RSA), "fips_check_rsa"},
  40. {ERR_FUNC(FIPS_F_FIPS_CHECK_RSA_PRNG), "fips_check_rsa_prng"},
  41. {ERR_FUNC(FIPS_F_FIPS_CIPHER), "FIPS_cipher"},
  42. {ERR_FUNC(FIPS_F_FIPS_CIPHERINIT), "FIPS_cipherinit"},
  43. {ERR_FUNC(FIPS_F_FIPS_CIPHER_CTX_CTRL), "FIPS_CIPHER_CTX_CTRL"},
  44. {ERR_FUNC(FIPS_F_FIPS_DIGESTFINAL), "FIPS_digestfinal"},
  45. {ERR_FUNC(FIPS_F_FIPS_DIGESTINIT), "FIPS_digestinit"},
  46. {ERR_FUNC(FIPS_F_FIPS_DIGESTUPDATE), "FIPS_digestupdate"},
  47. {ERR_FUNC(FIPS_F_FIPS_DRBG_BYTES), "FIPS_DRBG_BYTES"},
  48. {ERR_FUNC(FIPS_F_FIPS_DRBG_CHECK), "FIPS_DRBG_CHECK"},
  49. {ERR_FUNC(FIPS_F_FIPS_DRBG_CPRNG_TEST), "FIPS_DRBG_CPRNG_TEST"},
  50. {ERR_FUNC(FIPS_F_FIPS_DRBG_ERROR_CHECK), "FIPS_DRBG_ERROR_CHECK"},
  51. {ERR_FUNC(FIPS_F_FIPS_DRBG_GENERATE), "FIPS_drbg_generate"},
  52. {ERR_FUNC(FIPS_F_FIPS_DRBG_INIT), "FIPS_drbg_init"},
  53. {ERR_FUNC(FIPS_F_FIPS_DRBG_INSTANTIATE), "FIPS_drbg_instantiate"},
  54. {ERR_FUNC(FIPS_F_FIPS_DRBG_NEW), "FIPS_drbg_new"},
  55. {ERR_FUNC(FIPS_F_FIPS_DRBG_RESEED), "FIPS_drbg_reseed"},
  56. {ERR_FUNC(FIPS_F_FIPS_DRBG_SINGLE_KAT), "FIPS_DRBG_SINGLE_KAT"},
  57. {ERR_FUNC(FIPS_F_FIPS_DSA_SIGN_DIGEST), "FIPS_dsa_sign_digest"},
  58. {ERR_FUNC(FIPS_F_FIPS_DSA_VERIFY_DIGEST), "FIPS_dsa_verify_digest"},
  59. {ERR_FUNC(FIPS_F_FIPS_GET_ENTROPY), "FIPS_GET_ENTROPY"},
  60. {ERR_FUNC(FIPS_F_FIPS_MODULE_MODE_SET), "FIPS_module_mode_set"},
  61. {ERR_FUNC(FIPS_F_FIPS_PKEY_SIGNATURE_TEST), "fips_pkey_signature_test"},
  62. {ERR_FUNC(FIPS_F_FIPS_RAND_ADD), "FIPS_rand_add"},
  63. {ERR_FUNC(FIPS_F_FIPS_RAND_BYTES), "FIPS_rand_bytes"},
  64. {ERR_FUNC(FIPS_F_FIPS_RAND_PSEUDO_BYTES), "FIPS_rand_pseudo_bytes"},
  65. {ERR_FUNC(FIPS_F_FIPS_RAND_SEED), "FIPS_rand_seed"},
  66. {ERR_FUNC(FIPS_F_FIPS_RAND_SET_METHOD), "FIPS_rand_set_method"},
  67. {ERR_FUNC(FIPS_F_FIPS_RAND_STATUS), "FIPS_rand_status"},
  68. {ERR_FUNC(FIPS_F_FIPS_RSA_SIGN_DIGEST), "FIPS_rsa_sign_digest"},
  69. {ERR_FUNC(FIPS_F_FIPS_RSA_VERIFY_DIGEST), "FIPS_rsa_verify_digest"},
  70. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES), "FIPS_selftest_aes"},
  71. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES_CCM), "FIPS_selftest_aes_ccm"},
  72. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES_GCM), "FIPS_selftest_aes_gcm"},
  73. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES_XTS), "FIPS_selftest_aes_xts"},
  74. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_CMAC), "FIPS_selftest_cmac"},
  75. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_DES), "FIPS_selftest_des"},
  76. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_DSA), "FIPS_selftest_dsa"},
  77. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_ECDSA), "FIPS_selftest_ecdsa"},
  78. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_HMAC), "FIPS_selftest_hmac"},
  79. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_SHA1), "FIPS_selftest_sha1"},
  80. {ERR_FUNC(FIPS_F_FIPS_SELFTEST_X931), "FIPS_selftest_x931"},
  81. {ERR_FUNC(FIPS_F_FIPS_SET_PRNG_KEY), "FIPS_SET_PRNG_KEY"},
  82. {ERR_FUNC(FIPS_F_HASH_FINAL), "HASH_FINAL"},
  83. {ERR_FUNC(FIPS_F_RSA_BUILTIN_KEYGEN), "RSA_BUILTIN_KEYGEN"},
  84. {ERR_FUNC(FIPS_F_RSA_EAY_INIT), "RSA_EAY_INIT"},
  85. {ERR_FUNC(FIPS_F_RSA_EAY_PRIVATE_DECRYPT), "RSA_EAY_PRIVATE_DECRYPT"},
  86. {ERR_FUNC(FIPS_F_RSA_EAY_PRIVATE_ENCRYPT), "RSA_EAY_PRIVATE_ENCRYPT"},
  87. {ERR_FUNC(FIPS_F_RSA_EAY_PUBLIC_DECRYPT), "RSA_EAY_PUBLIC_DECRYPT"},
  88. {ERR_FUNC(FIPS_F_RSA_EAY_PUBLIC_ENCRYPT), "RSA_EAY_PUBLIC_ENCRYPT"},
  89. {ERR_FUNC(FIPS_F_RSA_X931_GENERATE_KEY_EX), "RSA_X931_generate_key_ex"},
  90. {0, NULL}
  91. };
  92. static ERR_STRING_DATA FIPS_str_reasons[] = {
  93. {ERR_REASON(FIPS_R_ADDITIONAL_INPUT_ERROR_UNDETECTED),
  94. "additional input error undetected"},
  95. {ERR_REASON(FIPS_R_ADDITIONAL_INPUT_TOO_LONG),
  96. "additional input too long"},
  97. {ERR_REASON(FIPS_R_ALREADY_INSTANTIATED), "already instantiated"},
  98. {ERR_REASON(FIPS_R_AUTHENTICATION_FAILURE), "authentication failure"},
  99. {ERR_REASON(FIPS_R_CONTRADICTING_EVIDENCE), "contradicting evidence"},
  100. {ERR_REASON(FIPS_R_DRBG_NOT_INITIALISED), "drbg not initialised"},
  101. {ERR_REASON(FIPS_R_DRBG_STUCK), "drbg stuck"},
  102. {ERR_REASON(FIPS_R_ENTROPY_ERROR_UNDETECTED), "entropy error undetected"},
  103. {ERR_REASON(FIPS_R_ENTROPY_NOT_REQUESTED_FOR_RESEED),
  104. "entropy not requested for reseed"},
  105. {ERR_REASON(FIPS_R_ENTROPY_SOURCE_STUCK), "entropy source stuck"},
  106. {ERR_REASON(FIPS_R_ERROR_INITIALISING_DRBG), "error initialising drbg"},
  107. {ERR_REASON(FIPS_R_ERROR_INSTANTIATING_DRBG), "error instantiating drbg"},
  108. {ERR_REASON(FIPS_R_ERROR_RETRIEVING_ADDITIONAL_INPUT),
  109. "error retrieving additional input"},
  110. {ERR_REASON(FIPS_R_ERROR_RETRIEVING_ENTROPY), "error retrieving entropy"},
  111. {ERR_REASON(FIPS_R_ERROR_RETRIEVING_NONCE), "error retrieving nonce"},
  112. {ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH),
  113. "fingerprint does not match"},
  114. {ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED),
  115. "fingerprint does not match nonpic relocated"},
  116. {ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH_SEGMENT_ALIASING),
  117. "fingerprint does not match segment aliasing"},
  118. {ERR_REASON(FIPS_R_FIPS_MODE_ALREADY_SET), "fips mode already set"},
  119. {ERR_REASON(FIPS_R_FIPS_SELFTEST_FAILED), "fips selftest failed"},
  120. {ERR_REASON(FIPS_R_FUNCTION_ERROR), "function error"},
  121. {ERR_REASON(FIPS_R_GENERATE_ERROR), "generate error"},
  122. {ERR_REASON(FIPS_R_GENERATE_ERROR_UNDETECTED),
  123. "generate error undetected"},
  124. {ERR_REASON(FIPS_R_INSTANTIATE_ERROR), "instantiate error"},
  125. {ERR_REASON(FIPS_R_INSUFFICIENT_SECURITY_STRENGTH),
  126. "insufficient security strength"},
  127. {ERR_REASON(FIPS_R_INTERNAL_ERROR), "internal error"},
  128. {ERR_REASON(FIPS_R_INVALID_KEY_LENGTH), "invalid key length"},
  129. {ERR_REASON(FIPS_R_INVALID_PARAMETERS), "invalid parameters"},
  130. {ERR_REASON(FIPS_R_IN_ERROR_STATE), "in error state"},
  131. {ERR_REASON(FIPS_R_KEY_TOO_SHORT), "key too short"},
  132. {ERR_REASON(FIPS_R_NONCE_ERROR_UNDETECTED), "nonce error undetected"},
  133. {ERR_REASON(FIPS_R_NON_FIPS_METHOD), "non fips method"},
  134. {ERR_REASON(FIPS_R_NOPR_TEST1_FAILURE), "nopr test1 failure"},
  135. {ERR_REASON(FIPS_R_NOPR_TEST2_FAILURE), "nopr test2 failure"},
  136. {ERR_REASON(FIPS_R_NOT_INSTANTIATED), "not instantiated"},
  137. {ERR_REASON(FIPS_R_PAIRWISE_TEST_FAILED), "pairwise test failed"},
  138. {ERR_REASON(FIPS_R_PERSONALISATION_ERROR_UNDETECTED),
  139. "personalisation error undetected"},
  140. {ERR_REASON(FIPS_R_PERSONALISATION_STRING_TOO_LONG),
  141. "personalisation string too long"},
  142. {ERR_REASON(FIPS_R_PRNG_STRENGTH_TOO_LOW), "prng strength too low"},
  143. {ERR_REASON(FIPS_R_PR_TEST1_FAILURE), "pr test1 failure"},
  144. {ERR_REASON(FIPS_R_PR_TEST2_FAILURE), "pr test2 failure"},
  145. {ERR_REASON(FIPS_R_REQUEST_LENGTH_ERROR_UNDETECTED),
  146. "request length error undetected"},
  147. {ERR_REASON(FIPS_R_REQUEST_TOO_LARGE_FOR_DRBG),
  148. "request too large for drbg"},
  149. {ERR_REASON(FIPS_R_RESEED_COUNTER_ERROR), "reseed counter error"},
  150. {ERR_REASON(FIPS_R_RESEED_ERROR), "reseed error"},
  151. {ERR_REASON(FIPS_R_SELFTEST_FAILED), "selftest failed"},
  152. {ERR_REASON(FIPS_R_SELFTEST_FAILURE), "selftest failure"},
  153. {ERR_REASON(FIPS_R_STRENGTH_ERROR_UNDETECTED),
  154. "strength error undetected"},
  155. {ERR_REASON(FIPS_R_TEST_FAILURE), "test failure"},
  156. {ERR_REASON(FIPS_R_UNINSTANTIATE_ERROR), "uninstantiate error"},
  157. {ERR_REASON(FIPS_R_UNINSTANTIATE_ZEROISE_ERROR),
  158. "uninstantiate zeroise error"},
  159. {ERR_REASON(FIPS_R_UNSUPPORTED_DRBG_TYPE), "unsupported drbg type"},
  160. {ERR_REASON(FIPS_R_UNSUPPORTED_PLATFORM), "unsupported platform"},
  161. {0, NULL}
  162. };
  163. #endif
  164. void ERR_load_FIPS_strings(void)
  165. {
  166. #ifndef OPENSSL_NO_ERR
  167. if (ERR_func_error_string(FIPS_str_functs[0].error) == NULL) {
  168. ERR_load_strings(0, FIPS_str_functs);
  169. ERR_load_strings(0, FIPS_str_reasons);
  170. }
  171. #endif
  172. }