err_all.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (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. #include <stdio.h>
  10. #include <openssl/err.h>
  11. #include "crypto/err.h"
  12. #include "crypto/cryptoerr.h"
  13. #include "crypto/asn1err.h"
  14. #include "crypto/bnerr.h"
  15. #include "crypto/ecerr.h"
  16. #include "crypto/buffererr.h"
  17. #include "crypto/bioerr.h"
  18. #include "crypto/comperr.h"
  19. #include "crypto/rsaerr.h"
  20. #include "crypto/dherr.h"
  21. #include "crypto/dsaerr.h"
  22. #include "crypto/evperr.h"
  23. #include "crypto/objectserr.h"
  24. #include "crypto/pemerr.h"
  25. #include "crypto/pkcs7err.h"
  26. #include "crypto/x509err.h"
  27. #include "crypto/x509v3err.h"
  28. #include "crypto/conferr.h"
  29. #include "crypto/pkcs12err.h"
  30. #include "crypto/randerr.h"
  31. #include "internal/dsoerr.h"
  32. #include "crypto/engineerr.h"
  33. #include "crypto/uierr.h"
  34. #include "crypto/httperr.h"
  35. #include "crypto/ocsperr.h"
  36. #include "crypto/tserr.h"
  37. #include "crypto/cmserr.h"
  38. #include "crypto/crmferr.h"
  39. #include "crypto/cmperr.h"
  40. #include "crypto/cterr.h"
  41. #include "crypto/asyncerr.h"
  42. #include "crypto/storeerr.h"
  43. #include "crypto/esserr.h"
  44. #include "internal/propertyerr.h"
  45. #include "prov/proverr.h"
  46. int ossl_err_load_crypto_strings(void)
  47. {
  48. if (0
  49. #ifndef OPENSSL_NO_ERR
  50. || ossl_err_load_ERR_strings() == 0 /* include error strings for SYSerr */
  51. || ossl_err_load_BN_strings() == 0
  52. || ossl_err_load_RSA_strings() == 0
  53. # ifndef OPENSSL_NO_DH
  54. || ossl_err_load_DH_strings() == 0
  55. # endif
  56. || ossl_err_load_EVP_strings() == 0
  57. || ossl_err_load_BUF_strings() == 0
  58. || ossl_err_load_OBJ_strings() == 0
  59. || ossl_err_load_PEM_strings() == 0
  60. # ifndef OPENSSL_NO_DSA
  61. || ossl_err_load_DSA_strings() == 0
  62. # endif
  63. || ossl_err_load_X509_strings() == 0
  64. || ossl_err_load_ASN1_strings() == 0
  65. || ossl_err_load_CONF_strings() == 0
  66. || ossl_err_load_CRYPTO_strings() == 0
  67. # ifndef OPENSSL_NO_COMP
  68. || ossl_err_load_COMP_strings() == 0
  69. # endif
  70. # ifndef OPENSSL_NO_EC
  71. || ossl_err_load_EC_strings() == 0
  72. # endif
  73. /* skip ossl_err_load_SSL_strings() because it is not in this library */
  74. || ossl_err_load_BIO_strings() == 0
  75. || ossl_err_load_PKCS7_strings() == 0
  76. || ossl_err_load_X509V3_strings() == 0
  77. || ossl_err_load_PKCS12_strings() == 0
  78. || ossl_err_load_RAND_strings() == 0
  79. || ossl_err_load_DSO_strings() == 0
  80. # ifndef OPENSSL_NO_TS
  81. || ossl_err_load_TS_strings() == 0
  82. # endif
  83. # ifndef OPENSSL_NO_ENGINE
  84. || ossl_err_load_ENGINE_strings() == 0
  85. # endif
  86. || ossl_err_load_HTTP_strings() == 0
  87. # ifndef OPENSSL_NO_OCSP
  88. || ossl_err_load_OCSP_strings() == 0
  89. # endif
  90. || ossl_err_load_UI_strings() == 0
  91. # ifndef OPENSSL_NO_CMS
  92. || ossl_err_load_CMS_strings() == 0
  93. # endif
  94. # ifndef OPENSSL_NO_CRMF
  95. || ossl_err_load_CRMF_strings() == 0
  96. || ossl_err_load_CMP_strings() == 0
  97. # endif
  98. # ifndef OPENSSL_NO_CT
  99. || ossl_err_load_CT_strings() == 0
  100. # endif
  101. || ossl_err_load_ESS_strings() == 0
  102. || ossl_err_load_ASYNC_strings() == 0
  103. || ossl_err_load_OSSL_STORE_strings() == 0
  104. || ossl_err_load_PROP_strings() == 0
  105. || ossl_err_load_PROV_strings() == 0
  106. #endif
  107. )
  108. return 0;
  109. return 1;
  110. }