Changes between 0.9.8e and 0.9.9 [xx XXX xxxx]
+ *) Load error codes if they are not already present instead of using a
+ static variable. This allows them to be cleanly unloaded and reloaded.
+ Improve header file function name parsing.
+ [Steve Henson]
+
*) Initial incomplete changes to avoid need for function casts in OpenSSL
when OPENSSL_NO_FCAST is set: some compilers (gcc 4.2 and later) reject
their use. Safestack is reimplemented using inline functions: tests show
/* crypto/asn1/asn1_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_EX_D2I), "ASN1_TEMPLATE_EX_D2I"},
{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_NEW), "ASN1_TEMPLATE_NEW"},
{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I), "ASN1_TEMPLATE_NOEXP_D2I"},
-{ERR_FUNC(ASN1_F_ASN1_TIME_SET), "ASN1_TIME_SET"},
+{ERR_FUNC(ASN1_F_ASN1_TIME_SET), "ASN1_TIME_set"},
{ERR_FUNC(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING), "ASN1_TYPE_get_int_octetstring"},
{ERR_FUNC(ASN1_F_ASN1_TYPE_GET_OCTETSTRING), "ASN1_TYPE_get_octetstring"},
{ERR_FUNC(ASN1_F_ASN1_UNPACK_STRING), "ASN1_unpack_string"},
{ERR_FUNC(ASN1_F_OID_MODULE_INIT), "OID_MODULE_INIT"},
{ERR_FUNC(ASN1_F_PARSE_TAGGING), "PARSE_TAGGING"},
{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET_IV), "PKCS5_pbe2_set_iv"},
+{ERR_FUNC(ASN1_F_PKCS5_PBE_SET), "PKCS5_pbe_set"},
{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"},
-{ERR_FUNC(ASN1_F_X509_CRL_ADD0_REVOKED), "X509_CRL_ADD0_REVOKED"},
-{ERR_FUNC(ASN1_F_X509_INFO_NEW), "X509_INFO_NEW"},
+{ERR_FUNC(ASN1_F_X509_CRL_ADD0_REVOKED), "X509_CRL_add0_revoked"},
+{ERR_FUNC(ASN1_F_X509_INFO_NEW), "X509_INFO_new"},
{ERR_FUNC(ASN1_F_X509_NAME_ENCODE), "X509_NAME_ENCODE"},
{ERR_FUNC(ASN1_F_X509_NAME_EX_D2I), "X509_NAME_EX_D2I"},
{ERR_FUNC(ASN1_F_X509_NAME_EX_NEW), "X509_NAME_EX_NEW"},
void ERR_load_ASN1_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(ASN1_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,ASN1_str_functs);
ERR_load_strings(0,ASN1_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/bio/bio_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_BIO_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(BIO_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,BIO_str_functs);
ERR_load_strings(0,BIO_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/bn/bn_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_BN_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(BN_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,BN_str_functs);
ERR_load_strings(0,BN_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/buffer/buf_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_BUF_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(BUF_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,BUF_str_functs);
ERR_load_strings(0,BUF_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/comp/comp_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_COMP_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(COMP_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,COMP_str_functs);
ERR_load_strings(0,COMP_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/conf/conf_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_CONF_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(CONF_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,CONF_str_functs);
ERR_load_strings(0,CONF_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/cpt_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_CRYPTO_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(CRYPTO_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,CRYPTO_str_functs);
ERR_load_strings(0,CRYPTO_str_reasons);
-#endif
-
}
+#endif
}
/* Function codes. */
#define DH_F_COMPUTE_KEY 102
-#define DH_F_DO_DH_PRINT 100
#define DH_F_DHPARAMS_PRINT_FP 101
#define DH_F_DH_BUILTIN_GENPARAMS 106
#define DH_F_DH_NEW_METHOD 105
#define DH_F_DH_PRIV_ENCODE 111
#define DH_F_DH_PUB_DECODE 108
#define DH_F_DH_PUB_ENCODE 109
+#define DH_F_DO_DH_PRINT 100
#define DH_F_GENERATE_KEY 103
#define DH_F_GENERATE_PARAMETERS 104
#define DH_F_PKEY_DH_DERIVE 112
/* crypto/dh/dh_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_DH_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(DH_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,DH_str_functs);
ERR_load_strings(0,DH_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/dsa/dsa_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_DSA_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(DSA_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,DSA_str_functs);
ERR_load_strings(0,DSA_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/dso/dso_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_DSO_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(DSO_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,DSO_str_functs);
ERR_load_strings(0,DSO_str_reasons);
-#endif
-
}
+#endif
}
#define EC_F_EC_KEY_PRINT 180
#define EC_F_EC_KEY_PRINT_FP 181
#define EC_F_EC_POINTS_MAKE_AFFINE 136
-#define EC_F_EC_POINTS_MUL 138
#define EC_F_EC_POINT_ADD 112
#define EC_F_EC_POINT_CMP 113
#define EC_F_EC_POINT_COPY 114
/* crypto/ec/ec_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(EC_F_EC_KEY_PRINT), "EC_KEY_print"},
{ERR_FUNC(EC_F_EC_KEY_PRINT_FP), "EC_KEY_print_fp"},
{ERR_FUNC(EC_F_EC_POINTS_MAKE_AFFINE), "EC_POINTs_make_affine"},
-{ERR_FUNC(EC_F_EC_POINTS_MUL), "EC_POINTs_mul"},
{ERR_FUNC(EC_F_EC_POINT_ADD), "EC_POINT_add"},
{ERR_FUNC(EC_F_EC_POINT_CMP), "EC_POINT_cmp"},
{ERR_FUNC(EC_F_EC_POINT_COPY), "EC_POINT_copy"},
void ERR_load_EC_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(EC_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,EC_str_functs);
ERR_load_strings(0,EC_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/ecdh/ech_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_ECDH_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(ECDH_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,ECDH_str_functs);
ERR_load_strings(0,ECDH_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/ecdsa/ecs_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_ECDSA_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(ECDSA_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,ECDSA_str_functs);
ERR_load_strings(0,ECDSA_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/engine/eng_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_ENGINE_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(ENGINE_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,ENGINE_str_functs);
ERR_load_strings(0,ENGINE_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/evp/evp_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_EVP_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(EVP_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,EVP_str_functs);
ERR_load_strings(0,EVP_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/objects/obj_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_OBJ_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(OBJ_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,OBJ_str_functs);
ERR_load_strings(0,OBJ_str_reasons);
-#endif
-
}
+#endif
}
#define OCSP_F_OCSP_CHECK_ISSUER 108
#define OCSP_F_OCSP_CHECK_VALIDITY 115
#define OCSP_F_OCSP_MATCH_ISSUERID 109
-#define OCSP_F_PARSE_HTTP_LINE1 118
#define OCSP_F_OCSP_PARSE_URL 114
#define OCSP_F_OCSP_REQUEST_SIGN 110
#define OCSP_F_OCSP_REQUEST_VERIFY 116
#define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111
#define OCSP_F_OCSP_SENDREQ_BIO 112
#define OCSP_F_OCSP_SENDREQ_NBIO 117
+#define OCSP_F_PARSE_HTTP_LINE1 118
#define OCSP_F_REQUEST_VERIFY 113
/* Reason codes. */
/* crypto/ocsp/ocsp_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_OCSP_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(OCSP_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,OCSP_str_functs);
ERR_load_strings(0,OCSP_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/pem/pem_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(PEM_F_PEM_WRITE), "PEM_write"},
{ERR_FUNC(PEM_F_PEM_WRITE_BIO), "PEM_write_bio"},
{ERR_FUNC(PEM_F_PEM_WRITE_PRIVATEKEY), "PEM_WRITE_PRIVATEKEY"},
-{ERR_FUNC(PEM_F_PEM_X509_INFO_READ), "PEM_X509_INFO_READ"},
-{ERR_FUNC(PEM_F_PEM_X509_INFO_READ_BIO), "PEM_X509_INFO_READ_BIO"},
+{ERR_FUNC(PEM_F_PEM_X509_INFO_READ), "PEM_X509_INFO_read"},
+{ERR_FUNC(PEM_F_PEM_X509_INFO_READ_BIO), "PEM_X509_INFO_read_bio"},
{ERR_FUNC(PEM_F_PEM_X509_INFO_WRITE_BIO), "PEM_X509_INFO_write_bio"},
{0,NULL}
};
void ERR_load_PEM_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(PEM_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,PEM_str_functs);
ERR_load_strings(0,PEM_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/pkcs12/pk12err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_PKCS12_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(PKCS12_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,PKCS12_str_functs);
ERR_load_strings(0,PKCS12_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/pkcs7/pkcs7err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(PKCS7_F_PKCS7_ADD_SIGNER), "PKCS7_add_signer"},
{ERR_FUNC(PKCS7_F_PKCS7_BIO_ADD_DIGEST), "PKCS7_BIO_ADD_DIGEST"},
{ERR_FUNC(PKCS7_F_PKCS7_COPY_EXISTING_DIGEST), "PKCS7_COPY_EXISTING_DIGEST"},
-{ERR_FUNC(PKCS7_F_PKCS7_CTRL), "PKCS7_CTRL"},
+{ERR_FUNC(PKCS7_F_PKCS7_CTRL), "PKCS7_ctrl"},
{ERR_FUNC(PKCS7_F_PKCS7_DATADECODE), "PKCS7_dataDecode"},
{ERR_FUNC(PKCS7_F_PKCS7_DATAFINAL), "PKCS7_dataFinal"},
{ERR_FUNC(PKCS7_F_PKCS7_DATAINIT), "PKCS7_dataInit"},
{ERR_FUNC(PKCS7_F_PKCS7_ENCRYPT), "PKCS7_encrypt"},
{ERR_FUNC(PKCS7_F_PKCS7_FINAL), "PKCS7_final"},
{ERR_FUNC(PKCS7_F_PKCS7_FIND_DIGEST), "PKCS7_FIND_DIGEST"},
-{ERR_FUNC(PKCS7_F_PKCS7_GET0_SIGNERS), "PKCS7_GET0_SIGNERS"},
+{ERR_FUNC(PKCS7_F_PKCS7_GET0_SIGNERS), "PKCS7_get0_signers"},
{ERR_FUNC(PKCS7_F_PKCS7_RECIP_INFO_SET), "PKCS7_RECIP_INFO_set"},
{ERR_FUNC(PKCS7_F_PKCS7_SET_CIPHER), "PKCS7_set_cipher"},
{ERR_FUNC(PKCS7_F_PKCS7_SET_CONTENT), "PKCS7_set_content"},
void ERR_load_PKCS7_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(PKCS7_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,PKCS7_str_functs);
ERR_load_strings(0,PKCS7_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/rand/rand_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_RAND_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(RAND_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,RAND_str_functs);
ERR_load_strings(0,RAND_str_reasons);
-#endif
-
}
+#endif
}
/* Function codes. */
#define RSA_F_CHECK_PADDING_MD 140
#define RSA_F_DO_RSA_PRINT 146
-#define RSA_F_RSA_VERIFY 119
+#define RSA_F_INT_RSA_VERIFY 145
#define RSA_F_MEMORY_LOCK 100
#define RSA_F_OLD_RSA_PRIV_DECODE 147
#define RSA_F_PKEY_RSA_CTRL 143
#define RSA_F_RSA_SETUP_BLINDING 136
#define RSA_F_RSA_SIGN 117
#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118
-#define RSA_F_INT_RSA_VERIFY 145
+#define RSA_F_RSA_VERIFY 119
#define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120
#define RSA_F_RSA_VERIFY_PKCS1_PSS 126
#define RSA_R_D_E_NOT_CONGRUENT_TO_1 123
#define RSA_R_FIRST_OCTET_INVALID 133
#define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE 144
-#define RSA_R_INVALID_DIGEST 105
#define RSA_R_INVALID_DIGEST_LENGTH 143
#define RSA_R_INVALID_HEADER 137
#define RSA_R_INVALID_KEYBITS 145
/* crypto/rsa/rsa_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_SSLV23), "RSA_padding_check_SSLv23"},
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931), "RSA_padding_check_X931"},
{ERR_FUNC(RSA_F_RSA_PRINT), "RSA_print"},
-{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_PRINT_FP"},
+{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_print_fp"},
{ERR_FUNC(RSA_F_RSA_PRIV_DECODE), "RSA_PRIV_DECODE"},
{ERR_FUNC(RSA_F_RSA_PRIV_ENCODE), "RSA_PRIV_ENCODE"},
{ERR_FUNC(RSA_F_RSA_PUB_DECODE), "RSA_PUB_DECODE"},
{ERR_REASON(RSA_R_D_E_NOT_CONGRUENT_TO_1),"d e not congruent to 1"},
{ERR_REASON(RSA_R_FIRST_OCTET_INVALID) ,"first octet invalid"},
{ERR_REASON(RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE),"illegal or unsupported padding mode"},
-{ERR_REASON(RSA_R_INVALID_DIGEST) ,"invalid digest"},
{ERR_REASON(RSA_R_INVALID_DIGEST_LENGTH) ,"invalid digest length"},
{ERR_REASON(RSA_R_INVALID_HEADER) ,"invalid header"},
{ERR_REASON(RSA_R_INVALID_KEYBITS) ,"invalid keybits"},
void ERR_load_RSA_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(RSA_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,RSA_str_functs);
ERR_load_strings(0,RSA_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/store/str_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_STORE_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(STORE_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,STORE_str_functs);
ERR_load_strings(0,STORE_str_reasons);
-#endif
-
}
+#endif
}
/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR
+
+#define ERR_FUNC(func) ERR_PACK(ERR_LIB_TS,func,0)
+#define ERR_REASON(reason) ERR_PACK(ERR_LIB_TS,0,reason)
+
static ERR_STRING_DATA TS_str_functs[]=
{
-{ERR_PACK(0,TS_F_D2I_TS_RESP,0), "d2i_TS_RESP"},
-{ERR_PACK(0,TS_F_DEF_SERIAL_CB,0), "DEF_SERIAL_CB"},
-{ERR_PACK(0,TS_F_DEF_TIME_CB,0), "DEF_TIME_CB"},
-{ERR_PACK(0,TS_F_ESS_ADD_SIGNING_CERT,0), "ESS_ADD_SIGNING_CERT"},
-{ERR_PACK(0,TS_F_ESS_CERT_ID_NEW_INIT,0), "ESS_CERT_ID_NEW_INIT"},
-{ERR_PACK(0,TS_F_ESS_SIGNING_CERT_NEW_INIT,0), "ESS_SIGNING_CERT_NEW_INIT"},
-{ERR_PACK(0,TS_F_PKCS7_TO_TS_TST_INFO,0), "PKCS7_to_TS_TST_INFO"},
-{ERR_PACK(0,TS_F_TS_ACCURACY_SET_MICROS,0), "TS_ACCURACY_set_micros"},
-{ERR_PACK(0,TS_F_TS_ACCURACY_SET_MILLIS,0), "TS_ACCURACY_set_millis"},
-{ERR_PACK(0,TS_F_TS_ACCURACY_SET_SECONDS,0), "TS_ACCURACY_set_seconds"},
-{ERR_PACK(0,TS_F_TS_CHECK_IMPRINTS,0), "TS_CHECK_IMPRINTS"},
-{ERR_PACK(0,TS_F_TS_CHECK_NONCES,0), "TS_CHECK_NONCES"},
-{ERR_PACK(0,TS_F_TS_CHECK_POLICY,0), "TS_CHECK_POLICY"},
-{ERR_PACK(0,TS_F_TS_CHECK_SIGNING_CERTS,0), "TS_CHECK_SIGNING_CERTS"},
-{ERR_PACK(0,TS_F_TS_CHECK_STATUS_INFO,0), "TS_CHECK_STATUS_INFO"},
-{ERR_PACK(0,TS_F_TS_COMPUTE_IMPRINT,0), "TS_COMPUTE_IMPRINT"},
-{ERR_PACK(0,TS_F_TS_CONF_SET_DEFAULT_ENGINE,0), "TS_CONF_set_default_engine"},
-{ERR_PACK(0,TS_F_TS_GET_STATUS_TEXT,0), "TS_GET_STATUS_TEXT"},
-{ERR_PACK(0,TS_F_TS_MSG_IMPRINT_SET_ALGO,0), "TS_MSG_IMPRINT_set_algo"},
-{ERR_PACK(0,TS_F_TS_REQ_SET_MSG_IMPRINT,0), "TS_REQ_set_msg_imprint"},
-{ERR_PACK(0,TS_F_TS_REQ_SET_NONCE,0), "TS_REQ_set_nonce"},
-{ERR_PACK(0,TS_F_TS_REQ_SET_POLICY_ID,0), "TS_REQ_set_policy_id"},
-{ERR_PACK(0,TS_F_TS_RESP_CREATE_RESPONSE,0), "TS_RESP_create_response"},
-{ERR_PACK(0,TS_F_TS_RESP_CREATE_TST_INFO,0), "TS_RESP_CREATE_TST_INFO"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_ADD_FAILURE_INFO,0), "TS_RESP_CTX_add_failure_info"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_ADD_MD,0), "TS_RESP_CTX_add_md"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_ADD_POLICY,0), "TS_RESP_CTX_add_policy"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_NEW,0), "TS_RESP_CTX_new"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_SET_ACCURACY,0), "TS_RESP_CTX_set_accuracy"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_SET_CERTS,0), "TS_RESP_CTX_set_certs"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_SET_DEF_POLICY,0), "TS_RESP_CTX_set_def_policy"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_SET_SIGNER_CERT,0), "TS_RESP_CTX_set_signer_cert"},
-{ERR_PACK(0,TS_F_TS_RESP_CTX_SET_STATUS_INFO,0), "TS_RESP_CTX_set_status_info"},
-{ERR_PACK(0,TS_F_TS_RESP_GET_POLICY,0), "TS_RESP_GET_POLICY"},
-{ERR_PACK(0,TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION,0), "TS_RESP_SET_GENTIME_WITH_PRECISION"},
-{ERR_PACK(0,TS_F_TS_RESP_SET_STATUS_INFO,0), "TS_RESP_set_status_info"},
-{ERR_PACK(0,TS_F_TS_RESP_SIGN,0), "TS_RESP_SIGN"},
-{ERR_PACK(0,TS_F_TS_RESP_VERIFY_SIGNATURE,0), "TS_RESP_verify_signature"},
-{ERR_PACK(0,TS_F_TS_RESP_VERIFY_TOKEN,0), "TS_RESP_verify_token"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_ACCURACY,0), "TS_TST_INFO_set_accuracy"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_MSG_IMPRINT,0), "TS_TST_INFO_set_msg_imprint"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_NONCE,0), "TS_TST_INFO_set_nonce"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_POLICY_ID,0), "TS_TST_INFO_set_policy_id"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_SERIAL,0), "TS_TST_INFO_set_serial"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_TIME,0), "TS_TST_INFO_set_time"},
-{ERR_PACK(0,TS_F_TS_TST_INFO_SET_TSA,0), "TS_TST_INFO_set_tsa"},
-{ERR_PACK(0,TS_F_TS_VERIFY,0), "TS_VERIFY"},
-{ERR_PACK(0,TS_F_TS_VERIFY_CERT,0), "TS_VERIFY_CERT"},
-{ERR_PACK(0,TS_F_TS_VERIFY_CTX_NEW,0), "TS_VERIFY_CTX_new"},
+{ERR_FUNC(TS_F_D2I_TS_RESP), "d2i_TS_RESP"},
+{ERR_FUNC(TS_F_DEF_SERIAL_CB), "DEF_SERIAL_CB"},
+{ERR_FUNC(TS_F_DEF_TIME_CB), "DEF_TIME_CB"},
+{ERR_FUNC(TS_F_ESS_ADD_SIGNING_CERT), "ESS_ADD_SIGNING_CERT"},
+{ERR_FUNC(TS_F_ESS_CERT_ID_NEW_INIT), "ESS_CERT_ID_NEW_INIT"},
+{ERR_FUNC(TS_F_ESS_SIGNING_CERT_NEW_INIT), "ESS_SIGNING_CERT_NEW_INIT"},
+{ERR_FUNC(TS_F_PKCS7_TO_TS_TST_INFO), "PKCS7_to_TS_TST_INFO"},
+{ERR_FUNC(TS_F_TS_ACCURACY_SET_MICROS), "TS_ACCURACY_set_micros"},
+{ERR_FUNC(TS_F_TS_ACCURACY_SET_MILLIS), "TS_ACCURACY_set_millis"},
+{ERR_FUNC(TS_F_TS_ACCURACY_SET_SECONDS), "TS_ACCURACY_set_seconds"},
+{ERR_FUNC(TS_F_TS_CHECK_IMPRINTS), "TS_CHECK_IMPRINTS"},
+{ERR_FUNC(TS_F_TS_CHECK_NONCES), "TS_CHECK_NONCES"},
+{ERR_FUNC(TS_F_TS_CHECK_POLICY), "TS_CHECK_POLICY"},
+{ERR_FUNC(TS_F_TS_CHECK_SIGNING_CERTS), "TS_CHECK_SIGNING_CERTS"},
+{ERR_FUNC(TS_F_TS_CHECK_STATUS_INFO), "TS_CHECK_STATUS_INFO"},
+{ERR_FUNC(TS_F_TS_COMPUTE_IMPRINT), "TS_COMPUTE_IMPRINT"},
+{ERR_FUNC(TS_F_TS_CONF_SET_DEFAULT_ENGINE), "TS_CONF_set_default_engine"},
+{ERR_FUNC(TS_F_TS_GET_STATUS_TEXT), "TS_GET_STATUS_TEXT"},
+{ERR_FUNC(TS_F_TS_MSG_IMPRINT_SET_ALGO), "TS_MSG_IMPRINT_set_algo"},
+{ERR_FUNC(TS_F_TS_REQ_SET_MSG_IMPRINT), "TS_REQ_set_msg_imprint"},
+{ERR_FUNC(TS_F_TS_REQ_SET_NONCE), "TS_REQ_set_nonce"},
+{ERR_FUNC(TS_F_TS_REQ_SET_POLICY_ID), "TS_REQ_set_policy_id"},
+{ERR_FUNC(TS_F_TS_RESP_CREATE_RESPONSE), "TS_RESP_create_response"},
+{ERR_FUNC(TS_F_TS_RESP_CREATE_TST_INFO), "TS_RESP_CREATE_TST_INFO"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_ADD_FAILURE_INFO), "TS_RESP_CTX_add_failure_info"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_ADD_MD), "TS_RESP_CTX_add_md"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_ADD_POLICY), "TS_RESP_CTX_add_policy"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_NEW), "TS_RESP_CTX_new"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_SET_ACCURACY), "TS_RESP_CTX_set_accuracy"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_SET_CERTS), "TS_RESP_CTX_set_certs"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_SET_DEF_POLICY), "TS_RESP_CTX_set_def_policy"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_SET_SIGNER_CERT), "TS_RESP_CTX_set_signer_cert"},
+{ERR_FUNC(TS_F_TS_RESP_CTX_SET_STATUS_INFO), "TS_RESP_CTX_set_status_info"},
+{ERR_FUNC(TS_F_TS_RESP_GET_POLICY), "TS_RESP_GET_POLICY"},
+{ERR_FUNC(TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION), "TS_RESP_SET_GENTIME_WITH_PRECISION"},
+{ERR_FUNC(TS_F_TS_RESP_SET_STATUS_INFO), "TS_RESP_set_status_info"},
+{ERR_FUNC(TS_F_TS_RESP_SIGN), "TS_RESP_SIGN"},
+{ERR_FUNC(TS_F_TS_RESP_VERIFY_SIGNATURE), "TS_RESP_verify_signature"},
+{ERR_FUNC(TS_F_TS_RESP_VERIFY_TOKEN), "TS_RESP_verify_token"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_ACCURACY), "TS_TST_INFO_set_accuracy"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_MSG_IMPRINT), "TS_TST_INFO_set_msg_imprint"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_NONCE), "TS_TST_INFO_set_nonce"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_POLICY_ID), "TS_TST_INFO_set_policy_id"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_SERIAL), "TS_TST_INFO_set_serial"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_TIME), "TS_TST_INFO_set_time"},
+{ERR_FUNC(TS_F_TS_TST_INFO_SET_TSA), "TS_TST_INFO_set_tsa"},
+{ERR_FUNC(TS_F_TS_VERIFY), "TS_VERIFY"},
+{ERR_FUNC(TS_F_TS_VERIFY_CERT), "TS_VERIFY_CERT"},
+{ERR_FUNC(TS_F_TS_VERIFY_CTX_NEW), "TS_VERIFY_CTX_new"},
{0,NULL}
};
static ERR_STRING_DATA TS_str_reasons[]=
{
-{TS_R_BAD_PKCS7_TYPE ,"bad pkcs7 type"},
-{TS_R_BAD_TYPE ,"bad type"},
-{TS_R_CERTIFICATE_VERIFY_ERROR ,"certificate verify error"},
-{TS_R_COULD_NOT_SET_ENGINE ,"could not set engine"},
-{TS_R_COULD_NOT_SET_TIME ,"could not set time"},
-{TS_R_D2I_TS_RESP_INT_FAILED ,"d2i ts resp int failed"},
-{TS_R_DETACHED_CONTENT ,"detached content"},
-{TS_R_ESS_ADD_SIGNING_CERT_ERROR ,"ess add signing cert error"},
-{TS_R_ESS_SIGNING_CERTIFICATE_ERROR ,"ess signing certificate error"},
-{TS_R_INVALID_NULL_POINTER ,"invalid null pointer"},
-{TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE ,"invalid signer certificate purpose"},
-{TS_R_MESSAGE_IMPRINT_MISMATCH ,"message imprint mismatch"},
-{TS_R_NONCE_MISMATCH ,"nonce mismatch"},
-{TS_R_NONCE_NOT_RETURNED ,"nonce not returned"},
-{TS_R_NO_CONTENT ,"no content"},
-{TS_R_NO_TIME_STAMP_TOKEN ,"no time stamp token"},
-{TS_R_PKCS7_ADD_SIGNATURE_ERROR ,"pkcs7 add signature error"},
-{TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR ,"pkcs7 add signed attr error"},
-{TS_R_PKCS7_TO_TS_TST_INFO_FAILED ,"pkcs7 to ts tst info failed"},
-{TS_R_POLICY_MISMATCH ,"policy mismatch"},
-{TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE,"private key does not match certificate"},
-{TS_R_RESPONSE_SETUP_ERROR ,"response setup error"},
-{TS_R_SIGNATURE_FAILURE ,"signature failure"},
-{TS_R_THERE_MUST_BE_ONE_SIGNER ,"there must be one signer"},
-{TS_R_TIME_SYSCALL_ERROR ,"time syscall error"},
-{TS_R_TOKEN_NOT_PRESENT ,"token not present"},
-{TS_R_TOKEN_PRESENT ,"token present"},
-{TS_R_TSA_NAME_MISMATCH ,"tsa name mismatch"},
-{TS_R_TSA_UNTRUSTED ,"tsa untrusted"},
-{TS_R_TST_INFO_SETUP_ERROR ,"tst info setup error"},
-{TS_R_TS_DATASIGN ,"ts datasign"},
-{TS_R_UNACCEPTABLE_POLICY ,"unacceptable policy"},
-{TS_R_UNSUPPORTED_MD_ALGORITHM ,"unsupported md algorithm"},
-{TS_R_UNSUPPORTED_VERSION ,"unsupported version"},
-{TS_R_WRONG_CONTENT_TYPE ,"wrong content type"},
+{ERR_REASON(TS_R_BAD_PKCS7_TYPE) ,"bad pkcs7 type"},
+{ERR_REASON(TS_R_BAD_TYPE) ,"bad type"},
+{ERR_REASON(TS_R_CERTIFICATE_VERIFY_ERROR),"certificate verify error"},
+{ERR_REASON(TS_R_COULD_NOT_SET_ENGINE) ,"could not set engine"},
+{ERR_REASON(TS_R_COULD_NOT_SET_TIME) ,"could not set time"},
+{ERR_REASON(TS_R_D2I_TS_RESP_INT_FAILED) ,"d2i ts resp int failed"},
+{ERR_REASON(TS_R_DETACHED_CONTENT) ,"detached content"},
+{ERR_REASON(TS_R_ESS_ADD_SIGNING_CERT_ERROR),"ess add signing cert error"},
+{ERR_REASON(TS_R_ESS_SIGNING_CERTIFICATE_ERROR),"ess signing certificate error"},
+{ERR_REASON(TS_R_INVALID_NULL_POINTER) ,"invalid null pointer"},
+{ERR_REASON(TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE),"invalid signer certificate purpose"},
+{ERR_REASON(TS_R_MESSAGE_IMPRINT_MISMATCH),"message imprint mismatch"},
+{ERR_REASON(TS_R_NONCE_MISMATCH) ,"nonce mismatch"},
+{ERR_REASON(TS_R_NONCE_NOT_RETURNED) ,"nonce not returned"},
+{ERR_REASON(TS_R_NO_CONTENT) ,"no content"},
+{ERR_REASON(TS_R_NO_TIME_STAMP_TOKEN) ,"no time stamp token"},
+{ERR_REASON(TS_R_PKCS7_ADD_SIGNATURE_ERROR),"pkcs7 add signature error"},
+{ERR_REASON(TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR),"pkcs7 add signed attr error"},
+{ERR_REASON(TS_R_PKCS7_TO_TS_TST_INFO_FAILED),"pkcs7 to ts tst info failed"},
+{ERR_REASON(TS_R_POLICY_MISMATCH) ,"policy mismatch"},
+{ERR_REASON(TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),"private key does not match certificate"},
+{ERR_REASON(TS_R_RESPONSE_SETUP_ERROR) ,"response setup error"},
+{ERR_REASON(TS_R_SIGNATURE_FAILURE) ,"signature failure"},
+{ERR_REASON(TS_R_THERE_MUST_BE_ONE_SIGNER),"there must be one signer"},
+{ERR_REASON(TS_R_TIME_SYSCALL_ERROR) ,"time syscall error"},
+{ERR_REASON(TS_R_TOKEN_NOT_PRESENT) ,"token not present"},
+{ERR_REASON(TS_R_TOKEN_PRESENT) ,"token present"},
+{ERR_REASON(TS_R_TSA_NAME_MISMATCH) ,"tsa name mismatch"},
+{ERR_REASON(TS_R_TSA_UNTRUSTED) ,"tsa untrusted"},
+{ERR_REASON(TS_R_TST_INFO_SETUP_ERROR) ,"tst info setup error"},
+{ERR_REASON(TS_R_TS_DATASIGN) ,"ts datasign"},
+{ERR_REASON(TS_R_UNACCEPTABLE_POLICY) ,"unacceptable policy"},
+{ERR_REASON(TS_R_UNSUPPORTED_MD_ALGORITHM),"unsupported md algorithm"},
+{ERR_REASON(TS_R_UNSUPPORTED_VERSION) ,"unsupported version"},
+{ERR_REASON(TS_R_WRONG_CONTENT_TYPE) ,"wrong content type"},
{0,NULL}
};
void ERR_load_TS_strings(void)
{
- static int init=1;
-
- if (init)
- {
- init=0;
#ifndef OPENSSL_NO_ERR
- ERR_load_strings(ERR_LIB_TS,TS_str_functs);
- ERR_load_strings(ERR_LIB_TS,TS_str_reasons);
-#endif
+ if (ERR_func_error_string(TS_str_functs[0].error) == NULL)
+ {
+ ERR_load_strings(0,TS_str_functs);
+ ERR_load_strings(0,TS_str_reasons);
}
+#endif
}
/* crypto/ui/ui_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_UI_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(UI_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,UI_str_functs);
ERR_load_strings(0,UI_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/x509/x509_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void ERR_load_X509_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(X509_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,X509_str_functs);
ERR_load_strings(0,X509_str_reasons);
-#endif
-
}
+#endif
}
/* crypto/x509v3/v3err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(X509V3_F_S2I_SKEY_ID), "S2I_SKEY_ID"},
{ERR_FUNC(X509V3_F_SET_DIST_POINT_NAME), "SET_DIST_POINT_NAME"},
{ERR_FUNC(X509V3_F_STRING_TO_HEX), "string_to_hex"},
-{ERR_FUNC(X509V3_F_SXNET_ADD_ID_ASC), "SXNET_ADD_ID_ASC"},
+{ERR_FUNC(X509V3_F_SXNET_ADD_ID_ASC), "SXNET_add_id_asc"},
{ERR_FUNC(X509V3_F_SXNET_ADD_ID_INTEGER), "SXNET_add_id_INTEGER"},
{ERR_FUNC(X509V3_F_SXNET_ADD_ID_ULONG), "SXNET_add_id_ulong"},
{ERR_FUNC(X509V3_F_SXNET_GET_ID_ASC), "SXNET_get_id_asc"},
{ERR_FUNC(X509V3_F_SXNET_GET_ID_ULONG), "SXNET_get_id_ulong"},
-{ERR_FUNC(X509V3_F_V2I_ASN1_BIT_STRING), "V2I_ASN1_BIT_STRING"},
+{ERR_FUNC(X509V3_F_V2I_ASN1_BIT_STRING), "v2i_ASN1_BIT_STRING"},
{ERR_FUNC(X509V3_F_V2I_AUTHORITY_INFO_ACCESS), "V2I_AUTHORITY_INFO_ACCESS"},
{ERR_FUNC(X509V3_F_V2I_AUTHORITY_KEYID), "V2I_AUTHORITY_KEYID"},
{ERR_FUNC(X509V3_F_V2I_BASIC_CONSTRAINTS), "V2I_BASIC_CONSTRAINTS"},
{ERR_FUNC(X509V3_F_X509V3_EXT_CONF), "X509V3_EXT_conf"},
{ERR_FUNC(X509V3_F_X509V3_EXT_I2D), "X509V3_EXT_i2d"},
{ERR_FUNC(X509V3_F_X509V3_EXT_NCONF), "X509V3_EXT_nconf"},
-{ERR_FUNC(X509V3_F_X509V3_GET_SECTION), "X509V3_GET_SECTION"},
+{ERR_FUNC(X509V3_F_X509V3_GET_SECTION), "X509V3_get_section"},
{ERR_FUNC(X509V3_F_X509V3_GET_STRING), "X509V3_get_string"},
{ERR_FUNC(X509V3_F_X509V3_GET_VALUE_BOOL), "X509V3_get_value_bool"},
-{ERR_FUNC(X509V3_F_X509V3_PARSE_LIST), "X509V3_PARSE_LIST"},
+{ERR_FUNC(X509V3_F_X509V3_PARSE_LIST), "X509V3_parse_list"},
{ERR_FUNC(X509V3_F_X509_PURPOSE_ADD), "X509_PURPOSE_add"},
{ERR_FUNC(X509V3_F_X509_PURPOSE_SET), "X509_PURPOSE_set"},
{0,NULL}
void ERR_load_X509V3_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(X509V3_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,X509V3_str_functs);
ERR_load_strings(0,X509V3_str_reasons);
-#endif
-
}
+#endif
}
/* ssl/ssl_err.c */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{ERR_FUNC(SSL_F_SSL_GET_SERVER_SEND_CERT), "SSL_GET_SERVER_SEND_CERT"},
{ERR_FUNC(SSL_F_SSL_GET_SIGN_PKEY), "SSL_GET_SIGN_PKEY"},
{ERR_FUNC(SSL_F_SSL_INIT_WBIO_BUFFER), "SSL_INIT_WBIO_BUFFER"},
-{ERR_FUNC(SSL_F_SSL_LOAD_CLIENT_CA_FILE), "SSL_LOAD_CLIENT_CA_FILE"},
+{ERR_FUNC(SSL_F_SSL_LOAD_CLIENT_CA_FILE), "SSL_load_client_CA_file"},
{ERR_FUNC(SSL_F_SSL_NEW), "SSL_new"},
{ERR_FUNC(SSL_F_SSL_PEEK), "SSL_peek"},
{ERR_FUNC(SSL_F_SSL_READ), "SSL_read"},
void ERR_load_SSL_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(SSL_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings(0,SSL_str_functs);
ERR_load_strings(0,SSL_str_reasons);
-#endif
-
}
+#endif
}
print STDERR " \r" if $debug;
$defnr = 0;
+ # Delete any DECLARE_ macros
+ $def =~ s/DECLARE_\w+\([\w,\s]+\)//gs;
foreach (split /;/, $def) {
$defnr++;
print STDERR "def: $defnr\r" if $debug;
# Skip over recognized non-function declarations
next if(/typedef\W/ or /DECLARE_STACK_OF/ or /TYPEDEF_.*_OF/);
+ # Remove STACK_OF(foo)
+ s/STACK_OF\(\w+\)/void/;
+
# Reduce argument lists to empty ()
# fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {}
while(/\(.*\)/s) {
if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) {
$err_reason_strings{$1} = $2;
}
+ if (/\b${lib}_F_(\w*)\b.*\"(.*)\"/) {
+ if (!exists $ftrans{$1} && ($1 ne $2)) {
+ print STDERR "WARNING: Mismatched function string $2\n";
+ $ftrans{$1} = $2;
+ }
+ }
}
close(IN);
}
+
my $hincf;
if($static) {
$hfile =~ /([^\/]+)$/;
print OUT <<"EOF";
/* $cfile */
/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
${staticloader}void ERR_load_${lib}_strings(void)
{
- static int init=1;
+#ifndef OPENSSL_NO_ERR
- if (init)
+ if (ERR_func_error_string(${lib}_str_functs[0].error) == NULL)
{
- init=0;
-#ifndef OPENSSL_NO_ERR
ERR_load_strings($load_errcode,${lib}_str_functs);
ERR_load_strings($load_errcode,${lib}_str_reasons);
-#endif
-
}
+#endif
}
EOF
} else {