dso_err.c 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 "internal/dso.h"
  13. /* BEGIN ERROR CODES */
  14. #ifndef OPENSSL_NO_ERR
  15. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSO,func,0)
  16. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_DSO,0,reason)
  17. static ERR_STRING_DATA DSO_str_functs[] = {
  18. {ERR_FUNC(DSO_F_DLFCN_BIND_FUNC), "dlfcn_bind_func"},
  19. {ERR_FUNC(DSO_F_DLFCN_LOAD), "dlfcn_load"},
  20. {ERR_FUNC(DSO_F_DLFCN_MERGER), "dlfcn_merger"},
  21. {ERR_FUNC(DSO_F_DLFCN_NAME_CONVERTER), "dlfcn_name_converter"},
  22. {ERR_FUNC(DSO_F_DLFCN_UNLOAD), "dlfcn_unload"},
  23. {ERR_FUNC(DSO_F_DL_BIND_FUNC), "dl_bind_func"},
  24. {ERR_FUNC(DSO_F_DL_LOAD), "dl_load"},
  25. {ERR_FUNC(DSO_F_DL_MERGER), "dl_merger"},
  26. {ERR_FUNC(DSO_F_DL_NAME_CONVERTER), "dl_name_converter"},
  27. {ERR_FUNC(DSO_F_DL_UNLOAD), "dl_unload"},
  28. {ERR_FUNC(DSO_F_DSO_BIND_FUNC), "DSO_bind_func"},
  29. {ERR_FUNC(DSO_F_DSO_CONVERT_FILENAME), "DSO_convert_filename"},
  30. {ERR_FUNC(DSO_F_DSO_CTRL), "DSO_ctrl"},
  31. {ERR_FUNC(DSO_F_DSO_FREE), "DSO_free"},
  32. {ERR_FUNC(DSO_F_DSO_GET_FILENAME), "DSO_get_filename"},
  33. {ERR_FUNC(DSO_F_DSO_GLOBAL_LOOKUP), "DSO_global_lookup"},
  34. {ERR_FUNC(DSO_F_DSO_LOAD), "DSO_load"},
  35. {ERR_FUNC(DSO_F_DSO_MERGE), "DSO_merge"},
  36. {ERR_FUNC(DSO_F_DSO_NEW_METHOD), "DSO_new_method"},
  37. {ERR_FUNC(DSO_F_DSO_PATHBYADDR), "DSO_pathbyaddr"},
  38. {ERR_FUNC(DSO_F_DSO_SET_FILENAME), "DSO_set_filename"},
  39. {ERR_FUNC(DSO_F_DSO_UP_REF), "DSO_up_ref"},
  40. {ERR_FUNC(DSO_F_VMS_BIND_SYM), "vms_bind_sym"},
  41. {ERR_FUNC(DSO_F_VMS_LOAD), "vms_load"},
  42. {ERR_FUNC(DSO_F_VMS_MERGER), "vms_merger"},
  43. {ERR_FUNC(DSO_F_VMS_UNLOAD), "vms_unload"},
  44. {ERR_FUNC(DSO_F_WIN32_BIND_FUNC), "win32_bind_func"},
  45. {ERR_FUNC(DSO_F_WIN32_GLOBALLOOKUP), "win32_globallookup"},
  46. {ERR_FUNC(DSO_F_WIN32_JOINER), "win32_joiner"},
  47. {ERR_FUNC(DSO_F_WIN32_LOAD), "win32_load"},
  48. {ERR_FUNC(DSO_F_WIN32_MERGER), "win32_merger"},
  49. {ERR_FUNC(DSO_F_WIN32_NAME_CONVERTER), "win32_name_converter"},
  50. {ERR_FUNC(DSO_F_WIN32_PATHBYADDR), "win32_pathbyaddr"},
  51. {ERR_FUNC(DSO_F_WIN32_SPLITTER), "win32_splitter"},
  52. {ERR_FUNC(DSO_F_WIN32_UNLOAD), "win32_unload"},
  53. {0, NULL}
  54. };
  55. static ERR_STRING_DATA DSO_str_reasons[] = {
  56. {ERR_REASON(DSO_R_CTRL_FAILED), "control command failed"},
  57. {ERR_REASON(DSO_R_DSO_ALREADY_LOADED), "dso already loaded"},
  58. {ERR_REASON(DSO_R_EMPTY_FILE_STRUCTURE), "empty file structure"},
  59. {ERR_REASON(DSO_R_FAILURE), "failure"},
  60. {ERR_REASON(DSO_R_FILENAME_TOO_BIG), "filename too big"},
  61. {ERR_REASON(DSO_R_FINISH_FAILED), "cleanup method function failed"},
  62. {ERR_REASON(DSO_R_INCORRECT_FILE_SYNTAX), "incorrect file syntax"},
  63. {ERR_REASON(DSO_R_LOAD_FAILED), "could not load the shared library"},
  64. {ERR_REASON(DSO_R_NAME_TRANSLATION_FAILED), "name translation failed"},
  65. {ERR_REASON(DSO_R_NO_FILENAME), "no filename"},
  66. {ERR_REASON(DSO_R_NULL_HANDLE), "a null shared library handle was used"},
  67. {ERR_REASON(DSO_R_SET_FILENAME_FAILED), "set filename failed"},
  68. {ERR_REASON(DSO_R_STACK_ERROR), "the meth_data stack is corrupt"},
  69. {ERR_REASON(DSO_R_SYM_FAILURE),
  70. "could not bind to the requested symbol name"},
  71. {ERR_REASON(DSO_R_UNLOAD_FAILED), "could not unload the shared library"},
  72. {ERR_REASON(DSO_R_UNSUPPORTED), "functionality not supported"},
  73. {0, NULL}
  74. };
  75. #endif
  76. int ERR_load_DSO_strings(void)
  77. {
  78. #ifndef OPENSSL_NO_ERR
  79. if (ERR_func_error_string(DSO_str_functs[0].error) == NULL) {
  80. ERR_load_strings(0, DSO_str_functs);
  81. ERR_load_strings(0, DSO_str_reasons);
  82. }
  83. #endif
  84. return 1;
  85. }