cpt_err.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Generated by util/mkerr.pl DO NOT EDIT
  3. * Copyright 1995-2016 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/crypto.h>
  13. /* BEGIN ERROR CODES */
  14. #ifndef OPENSSL_NO_ERR
  15. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_CRYPTO,func,0)
  16. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_CRYPTO,0,reason)
  17. static ERR_STRING_DATA CRYPTO_str_functs[] = {
  18. {ERR_FUNC(CRYPTO_F_CRYPTO_DUP_EX_DATA), "CRYPTO_dup_ex_data"},
  19. {ERR_FUNC(CRYPTO_F_CRYPTO_FREE_EX_DATA), "CRYPTO_free_ex_data"},
  20. {ERR_FUNC(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX), "CRYPTO_get_ex_new_index"},
  21. {ERR_FUNC(CRYPTO_F_CRYPTO_MEMDUP), "CRYPTO_memdup"},
  22. {ERR_FUNC(CRYPTO_F_CRYPTO_NEW_EX_DATA), "CRYPTO_new_ex_data"},
  23. {ERR_FUNC(CRYPTO_F_CRYPTO_SET_EX_DATA), "CRYPTO_set_ex_data"},
  24. {ERR_FUNC(CRYPTO_F_FIPS_MODE_SET), "FIPS_mode_set"},
  25. {ERR_FUNC(CRYPTO_F_GET_AND_LOCK), "get_and_lock"},
  26. {ERR_FUNC(CRYPTO_F_OPENSSL_BUF2HEXSTR), "OPENSSL_buf2hexstr"},
  27. {ERR_FUNC(CRYPTO_F_OPENSSL_HEXSTR2BUF), "OPENSSL_hexstr2buf"},
  28. {ERR_FUNC(CRYPTO_F_OPENSSL_INIT_CRYPTO), "OPENSSL_init_crypto"},
  29. {0, NULL}
  30. };
  31. static ERR_STRING_DATA CRYPTO_str_reasons[] = {
  32. {ERR_REASON(CRYPTO_R_FIPS_MODE_NOT_SUPPORTED), "fips mode not supported"},
  33. {ERR_REASON(CRYPTO_R_ILLEGAL_HEX_DIGIT), "illegal hex digit"},
  34. {ERR_REASON(CRYPTO_R_ODD_NUMBER_OF_DIGITS), "odd number of digits"},
  35. {0, NULL}
  36. };
  37. #endif
  38. int ERR_load_CRYPTO_strings(void)
  39. {
  40. #ifndef OPENSSL_NO_ERR
  41. if (ERR_func_error_string(CRYPTO_str_functs[0].error) == NULL) {
  42. ERR_load_strings(0, CRYPTO_str_functs);
  43. ERR_load_strings(0, CRYPTO_str_reasons);
  44. }
  45. #endif
  46. return 1;
  47. }