dso_err.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 "internal/dsoerr.h"
  12. #ifndef OPENSSL_NO_ERR
  13. static const ERR_STRING_DATA DSO_str_reasons[] = {
  14. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_CTRL_FAILED), "control command failed"},
  15. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_DSO_ALREADY_LOADED), "dso already loaded"},
  16. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_EMPTY_FILE_STRUCTURE),
  17. "empty file structure"},
  18. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_FAILURE), "failure"},
  19. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_FILENAME_TOO_BIG), "filename too big"},
  20. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_FINISH_FAILED),
  21. "cleanup method function failed"},
  22. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_INCORRECT_FILE_SYNTAX),
  23. "incorrect file syntax"},
  24. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_LOAD_FAILED),
  25. "could not load the shared library"},
  26. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_NAME_TRANSLATION_FAILED),
  27. "name translation failed"},
  28. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_NO_FILENAME), "no filename"},
  29. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_NULL_HANDLE),
  30. "a null shared library handle was used"},
  31. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_SET_FILENAME_FAILED),
  32. "set filename failed"},
  33. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_STACK_ERROR),
  34. "the meth_data stack is corrupt"},
  35. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_SYM_FAILURE),
  36. "could not bind to the requested symbol name"},
  37. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_UNLOAD_FAILED),
  38. "could not unload the shared library"},
  39. {ERR_PACK(ERR_LIB_DSO, 0, DSO_R_UNSUPPORTED),
  40. "functionality not supported"},
  41. {0, NULL}
  42. };
  43. #endif
  44. int ossl_err_load_DSO_strings(void)
  45. {
  46. #ifndef OPENSSL_NO_ERR
  47. if (ERR_reason_error_string(DSO_str_reasons[0].error) == NULL)
  48. ERR_load_strings_const(DSO_str_reasons);
  49. #endif
  50. return 1;
  51. }