2
0

e_loader_attic_err.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Generated by util/mkerr.pl DO NOT EDIT
  3. * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License 2.0 (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 <openssl/err.h>
  11. #include "e_loader_attic_err.h"
  12. #ifndef OPENSSL_NO_ERR
  13. static ERR_STRING_DATA ATTIC_str_reasons[] = {
  14. {ERR_PACK(0, 0, ATTIC_R_AMBIGUOUS_CONTENT_TYPE), "ambiguous content type"},
  15. {ERR_PACK(0, 0, ATTIC_R_BAD_PASSWORD_READ), "bad password read"},
  16. {ERR_PACK(0, 0, ATTIC_R_ERROR_VERIFYING_PKCS12_MAC),
  17. "error verifying pkcs12 mac"},
  18. {ERR_PACK(0, 0, ATTIC_R_INIT_FAILED), "init failed"},
  19. {ERR_PACK(0, 0, ATTIC_R_PASSPHRASE_CALLBACK_ERROR),
  20. "passphrase callback error"},
  21. {ERR_PACK(0, 0, ATTIC_R_PATH_MUST_BE_ABSOLUTE), "path must be absolute"},
  22. {ERR_PACK(0, 0, ATTIC_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES),
  23. "search only supported for directories"},
  24. {ERR_PACK(0, 0, ATTIC_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED),
  25. "ui process interrupted or cancelled"},
  26. {ERR_PACK(0, 0, ATTIC_R_UNSUPPORTED_CONTENT_TYPE),
  27. "unsupported content type"},
  28. {ERR_PACK(0, 0, ATTIC_R_UNSUPPORTED_SEARCH_TYPE),
  29. "unsupported search type"},
  30. {ERR_PACK(0, 0, ATTIC_R_URI_AUTHORITY_UNSUPPORTED),
  31. "uri authority unsupported"},
  32. {0, NULL}
  33. };
  34. #endif
  35. static int lib_code = 0;
  36. static int error_loaded = 0;
  37. static int ERR_load_ATTIC_strings(void)
  38. {
  39. if (lib_code == 0)
  40. lib_code = ERR_get_next_error_library();
  41. if (!error_loaded) {
  42. #ifndef OPENSSL_NO_ERR
  43. ERR_load_strings(lib_code, ATTIC_str_reasons);
  44. #endif
  45. error_loaded = 1;
  46. }
  47. return 1;
  48. }
  49. static void ERR_unload_ATTIC_strings(void)
  50. {
  51. if (error_loaded) {
  52. #ifndef OPENSSL_NO_ERR
  53. ERR_unload_strings(lib_code, ATTIC_str_reasons);
  54. #endif
  55. error_loaded = 0;
  56. }
  57. }
  58. static void ERR_ATTIC_error(int function, int reason, const char *file, int line)
  59. {
  60. if (lib_code == 0)
  61. lib_code = ERR_get_next_error_library();
  62. ERR_raise(lib_code, reason);
  63. ERR_set_debug(file, line, NULL);
  64. }