{ERR_FUNC(ASN1_F_ASN1_D2I_READ_BIO), "asn1_d2i_read_bio"},
{ERR_FUNC(ASN1_F_ASN1_DIGEST), "ASN1_digest"},
{ERR_FUNC(ASN1_F_ASN1_DO_ADB), "asn1_do_adb"},
+ {ERR_FUNC(ASN1_F_ASN1_DO_LOCK), "asn1_do_lock"},
{ERR_FUNC(ASN1_F_ASN1_DUP), "ASN1_dup"},
{ERR_FUNC(ASN1_F_ASN1_EX_C2I), "asn1_ex_c2i"},
{ERR_FUNC(ASN1_F_ASN1_FIND_END), "asn1_find_end"},
#endif
-void ERR_load_ASN1_strings(void)
+int ERR_load_ASN1_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, ASN1_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_ASYNC_strings(void)
+int ERR_load_ASYNC_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, ASYNC_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_BIO_strings(void)
+int ERR_load_BIO_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, BIO_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_BN_strings(void)
+int ERR_load_BN_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, BN_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_BUF_strings(void)
+int ERR_load_BUF_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, BUF_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_CMS_strings(void)
+int ERR_load_CMS_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, CMS_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_COMP_strings(void)
+int ERR_load_COMP_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, COMP_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_CONF_strings(void)
+int ERR_load_CONF_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, CONF_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_CRYPTO_strings(void)
+int ERR_load_CRYPTO_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, CRYPTO_str_reasons);
}
#endif
+ return 1;
}
{ERR_FUNC(CT_F_CTLOG_NEW_NULL), "CTLOG_new_null"},
{ERR_FUNC(CT_F_CTLOG_STORE_LOAD_CTX_NEW), "ctlog_store_load_ctx_new"},
{ERR_FUNC(CT_F_CTLOG_STORE_LOAD_FILE), "CTLOG_STORE_load_file"},
+ {ERR_FUNC(CT_F_CTLOG_STORE_LOAD_LOG), "ctlog_store_load_log"},
+ {ERR_FUNC(CT_F_CTLOG_STORE_NEW), "CTLOG_STORE_new"},
{ERR_FUNC(CT_F_CT_BASE64_DECODE), "ct_base64_decode"},
{ERR_FUNC(CT_F_CT_POLICY_EVAL_CTX_NEW), "CT_POLICY_EVAL_CTX_new"},
{ERR_FUNC(CT_F_CT_V1_LOG_ID_FROM_PKEY), "ct_v1_log_id_from_pkey"},
#endif
-void ERR_load_CT_strings(void)
+int ERR_load_CT_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, CT_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_DH_strings(void)
+int ERR_load_DH_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, DH_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_DSA_strings(void)
+int ERR_load_DSA_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, DSA_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_DSO_strings(void)
+int ERR_load_DSO_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, DSO_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_EC_strings(void)
+int ERR_load_EC_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, EC_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_ENGINE_strings(void)
+int ERR_load_ENGINE_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, ENGINE_str_reasons);
}
#endif
+ return 1;
}
err_string_lock = NULL;
}
-void ERR_load_ERR_strings(void)
+int ERR_load_ERR_strings(void)
{
#ifndef OPENSSL_NO_ERR
- RUN_ONCE(&err_string_init, do_err_strings_init);
+ if (!RUN_ONCE(&err_string_init, do_err_strings_init))
+ return 0;
err_load_strings(0, ERR_str_libraries);
err_load_strings(0, ERR_str_reasons);
build_SYS_str_reasons();
err_load_strings(ERR_LIB_SYS, SYS_str_reasons);
#endif
+ return 1;
}
static void err_load_strings(int lib, ERR_STRING_DATA *str)
CRYPTO_THREAD_unlock(err_string_lock);
}
-void ERR_load_strings(int lib, ERR_STRING_DATA *str)
+int ERR_load_strings(int lib, ERR_STRING_DATA *str)
{
- ERR_load_ERR_strings();
+ if (ERR_load_ERR_strings() == 0)
+ return 0;
err_load_strings(lib, str);
+ return 1;
}
int ERR_unload_strings(int lib, ERR_STRING_DATA *str)
#include <openssl/async.h>
#include <openssl/kdf.h>
-void err_load_crypto_strings_int(void)
+int err_load_crypto_strings_int(void)
{
+ if (
#ifdef OPENSSL_FIPS
- FIPS_set_error_callbacks(ERR_put_error, ERR_add_error_vdata);
+ FIPS_set_error_callbacks(ERR_put_error, ERR_add_error_vdata) == 0 ||
#endif
#ifndef OPENSSL_NO_ERR
- ERR_load_ERR_strings(); /* include error strings for SYSerr */
- ERR_load_BN_strings();
+ ERR_load_ERR_strings() == 0 || /* include error strings for SYSerr */
+ ERR_load_BN_strings() == 0 ||
# ifndef OPENSSL_NO_RSA
- ERR_load_RSA_strings();
+ ERR_load_RSA_strings() == 0 ||
# endif
# ifndef OPENSSL_NO_DH
- ERR_load_DH_strings();
+ ERR_load_DH_strings() == 0 ||
# endif
- ERR_load_EVP_strings();
- ERR_load_BUF_strings();
- ERR_load_OBJ_strings();
- ERR_load_PEM_strings();
+ ERR_load_EVP_strings() == 0 ||
+ ERR_load_BUF_strings() == 0 ||
+ ERR_load_OBJ_strings() == 0 ||
+ ERR_load_PEM_strings() == 0 ||
# ifndef OPENSSL_NO_DSA
- ERR_load_DSA_strings();
+ ERR_load_DSA_strings() == 0 ||
# endif
- ERR_load_X509_strings();
- ERR_load_ASN1_strings();
- ERR_load_CONF_strings();
- ERR_load_CRYPTO_strings();
+ ERR_load_X509_strings() == 0 ||
+ ERR_load_ASN1_strings() == 0 ||
+ ERR_load_CONF_strings() == 0 ||
+ ERR_load_CRYPTO_strings() == 0 ||
# ifndef OPENSSL_NO_COMP
- ERR_load_COMP_strings();
+ ERR_load_COMP_strings() == 0 ||
# endif
# ifndef OPENSSL_NO_EC
- ERR_load_EC_strings();
+ ERR_load_EC_strings() == 0 ||
# endif
- /* skip ERR_load_SSL_strings() because it is not in this library */
- ERR_load_BIO_strings();
- ERR_load_PKCS7_strings();
- ERR_load_X509V3_strings();
- ERR_load_PKCS12_strings();
- ERR_load_RAND_strings();
- ERR_load_DSO_strings();
+ /* skip ERR_load_SSL_strings() because it is not in this library */
+ ERR_load_BIO_strings() == 0 ||
+ ERR_load_PKCS7_strings() == 0 ||
+ ERR_load_X509V3_strings() == 0 ||
+ ERR_load_PKCS12_strings() == 0 ||
+ ERR_load_RAND_strings() == 0 ||
+ ERR_load_DSO_strings() == 0 ||
# ifndef OPENSSL_NO_TS
- ERR_load_TS_strings();
+ ERR_load_TS_strings() == 0 ||
# endif
# ifndef OPENSSL_NO_ENGINE
- ERR_load_ENGINE_strings();
+ ERR_load_ENGINE_strings() == 0 ||
# endif
# ifndef OPENSSL_NO_OCSP
- ERR_load_OCSP_strings();
+ ERR_load_OCSP_strings() == 0 ||
# endif
#ifndef OPENSSL_NO_UI
- ERR_load_UI_strings();
+ ERR_load_UI_strings() == 0 ||
#endif
# ifdef OPENSSL_FIPS
- ERR_load_FIPS_strings();
+ ERR_load_FIPS_strings() == 0 ||
# endif
# ifndef OPENSSL_NO_CMS
- ERR_load_CMS_strings();
+ ERR_load_CMS_strings() == 0 ||
# endif
# ifndef OPENSSL_NO_CT
- ERR_load_CT_strings();
+ ERR_load_CT_strings() == 0 ||
# endif
- ERR_load_ASYNC_strings();
+ ERR_load_ASYNC_strings() == 0 ||
#endif
- ERR_load_KDF_strings();
+ ERR_load_KDF_strings() == 0)
+ return 0;
+
+ return 1;
}
{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT), "EVP_PKEY_encrypt"},
{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT_INIT), "EVP_PKEY_encrypt_init"},
{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT_OLD), "EVP_PKEY_encrypt_old"},
- {ERR_FUNC(EVP_F_EVP_PKEY_GET0_HMAC), "EVP_PKEY_get0_hmac"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET0_DH), "EVP_PKEY_get0_DH"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET0_DSA), "EVP_PKEY_get0_DSA"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET0_EC_KEY), "EVP_PKEY_get0_EC_KEY"},
+ {ERR_FUNC(EVP_F_EVP_PKEY_GET0_HMAC), "EVP_PKEY_get0_hmac"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET0_RSA), "EVP_PKEY_get0_RSA"},
{ERR_FUNC(EVP_F_EVP_PKEY_KEYGEN), "EVP_PKEY_keygen"},
{ERR_FUNC(EVP_F_EVP_PKEY_KEYGEN_INIT), "EVP_PKEY_keygen_init"},
#endif
-void ERR_load_EVP_strings(void)
+int ERR_load_EVP_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, EVP_str_reasons);
}
#endif
+ return 1;
}
#ifndef INTERNAL_ERR_INT_H
# define INTERNAL_ERR_INT_H
-void err_load_crypto_strings_int(void);
+int err_load_crypto_strings_int(void);
void err_cleanup(void);
void err_delete_thread_state(void);
DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_strings)
{
+ int ret = 1;
/*
* OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
* pulling in all the error strings during static linking
fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_strings: "
"err_load_crypto_strings_int()\n");
# endif
- err_load_crypto_strings_int();
+ ret = err_load_crypto_strings_int();
#endif
load_crypto_strings_inited = 1;
- return 1;
+ return ret;
}
static CRYPTO_ONCE add_all_ciphers = CRYPTO_ONCE_STATIC_INIT;
#endif
-void ERR_load_KDF_strings(void)
+int ERR_load_KDF_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, KDF_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_OBJ_strings(void)
+int ERR_load_OBJ_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, OBJ_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_OCSP_strings(void)
+int ERR_load_OCSP_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, OCSP_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_PEM_strings(void)
+int ERR_load_PEM_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, PEM_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_PKCS12_strings(void)
+int ERR_load_PKCS12_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, PKCS12_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_PKCS7_strings(void)
+int ERR_load_PKCS7_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, PKCS7_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_RAND_strings(void)
+int ERR_load_RAND_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, RAND_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_RSA_strings(void)
+int ERR_load_RSA_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, RSA_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_TS_strings(void)
+int ERR_load_TS_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, TS_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_UI_strings(void)
+int ERR_load_UI_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, UI_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_X509_strings(void)
+int ERR_load_X509_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, X509_str_reasons);
}
#endif
+ return 1;
}
#endif
-void ERR_load_X509V3_strings(void)
+int ERR_load_X509V3_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, X509V3_str_reasons);
}
#endif
+ return 1;
}
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_DSO_strings(void);
+int ERR_load_DSO_strings(void);
/* Error codes for the DSO functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_ASN1_strings(void);
+int ERR_load_ASN1_strings(void);
/* Error codes for the ASN1 functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_ASYNC_strings(void);
+int ERR_load_ASYNC_strings(void);
/* Error codes for the ASYNC functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_BIO_strings(void);
+int ERR_load_BIO_strings(void);
/* Error codes for the BIO functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_BN_strings(void);
+int ERR_load_BN_strings(void);
/* Error codes for the BN functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_BUF_strings(void);
+int ERR_load_BUF_strings(void);
/* Error codes for the BUF functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_CMS_strings(void);
+int ERR_load_CMS_strings(void);
/* Error codes for the CMS functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_COMP_strings(void);
+int ERR_load_COMP_strings(void);
/* Error codes for the COMP functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_CONF_strings(void);
+int ERR_load_CONF_strings(void);
/* Error codes for the CONF functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_CRYPTO_strings(void);
+int ERR_load_CRYPTO_strings(void);
/* Error codes for the CRYPTO functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_CT_strings(void);
+int ERR_load_CT_strings(void);
/* Error codes for the CT functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_DH_strings(void);
+int ERR_load_DH_strings(void);
/* Error codes for the DH functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_DSA_strings(void);
+int ERR_load_DSA_strings(void);
/* Error codes for the DSA functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_EC_strings(void);
+int ERR_load_EC_strings(void);
/* Error codes for the EC functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_ENGINE_strings(void);
+int ERR_load_ENGINE_strings(void);
/* Error codes for the ENGINE functions. */
void ERR_print_errors(BIO *bp);
void ERR_add_error_data(int num, ...);
void ERR_add_error_vdata(int num, va_list args);
-void ERR_load_strings(int lib, ERR_STRING_DATA str[]);
+int ERR_load_strings(int lib, ERR_STRING_DATA str[]);
int ERR_unload_strings(int lib, ERR_STRING_DATA str[]);
-void ERR_load_ERR_strings(void);
+int ERR_load_ERR_strings(void);
#if OPENSSL_API_COMPAT < 0x10100000L
# define ERR_load_crypto_strings() \
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_EVP_strings(void);
+int ERR_load_EVP_strings(void);
/* Error codes for the EVP functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_KDF_strings(void);
+int ERR_load_KDF_strings(void);
/* Error codes for the KDF functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_OBJ_strings(void);
+int ERR_load_OBJ_strings(void);
/* Error codes for the OBJ functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_OCSP_strings(void);
+int ERR_load_OCSP_strings(void);
/* Error codes for the OCSP functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_PEM_strings(void);
+int ERR_load_PEM_strings(void);
/* Error codes for the PEM functions. */
#endif
#ifndef HEADER_PEM_H
-void ERR_load_PEM_strings(void);
+int ERR_load_PEM_strings(void);
#endif
#ifdef __cplusplus
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_PKCS12_strings(void);
+int ERR_load_PKCS12_strings(void);
/* Error codes for the PKCS12 functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_PKCS7_strings(void);
+int ERR_load_PKCS7_strings(void);
/* Error codes for the PKCS7 functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_RAND_strings(void);
+int ERR_load_RAND_strings(void);
/* Error codes for the RAND functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_RSA_strings(void);
+int ERR_load_RSA_strings(void);
/* Error codes for the RSA functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_SSL_strings(void);
+int ERR_load_SSL_strings(void);
/* Error codes for the SSL functions. */
const unsigned char **pp, long length);
ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a);
-void ERR_load_TS_strings(void);
-
int TS_REQ_set_version(TS_REQ *a, long version);
long TS_REQ_get_version(const TS_REQ *a);
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_TS_strings(void);
+int ERR_load_TS_strings(void);
/* Error codes for the TS functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_UI_strings(void);
+int ERR_load_UI_strings(void);
/* Error codes for the UI functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_X509_strings(void);
+int ERR_load_X509_strings(void);
/* Error codes for the X509 functions. */
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_X509V3_strings(void);
+int ERR_load_X509V3_strings(void);
/* Error codes for the X509V3 functions. */
#endif
-void ERR_load_SSL_strings(void)
+int ERR_load_SSL_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings(0, SSL_str_reasons);
}
#endif
+ return 1;
}
EOF
if($static) {
print OUT <<"EOF";
-${staticloader}void ERR_load_${lib}_strings(void);
+${staticloader}int ERR_load_${lib}_strings(void);
EOF
} else {
print OUT <<"EOF";
-${staticloader}void ERR_load_${lib}_strings(void);
+${staticloader}int ERR_load_${lib}_strings(void);
${staticloader}void ERR_unload_${lib}_strings(void);
${staticloader}void ERR_${lib}_error(int function, int reason, char *file, int line);
# define ${lib}err(f,r) ERR_${lib}_error((f),(r),OPENSSL_FILE,OPENSSL_LINE)
#endif
-${staticloader}void ERR_load_${lib}_strings(void)
+${staticloader}int ERR_load_${lib}_strings(void)
{
#ifndef OPENSSL_NO_ERR
ERR_load_strings($load_errcode, ${lib}_str_reasons);
}
#endif
+ return 1;
}
EOF
} else {
static int ${lib}_lib_error_code = 0;
static int ${lib}_error_init = 1;
-${staticloader}void ERR_load_${lib}_strings(void)
+${staticloader}int ERR_load_${lib}_strings(void)
{
if (${lib}_lib_error_code == 0)
${lib}_lib_error_code = ERR_get_next_error_library();
ERR_load_strings(0, ${lib}_lib_name);
#endif
}
+ return 1;
}
${staticloader}void ERR_unload_${lib}_strings(void)