Update from 0.9.8 stable. Eliminate duplicate error codes.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 21 Nov 2006 21:29:44 +0000 (21:29 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 21 Nov 2006 21:29:44 +0000 (21:29 +0000)
34 files changed:
CHANGES
crypto/asn1/asn1_err.c
crypto/bio/bio_err.c
crypto/bn/bn_err.c
crypto/buffer/buf_err.c
crypto/comp/comp_err.c
crypto/conf/conf_err.c
crypto/cpt_err.c
crypto/dh/dh.h
crypto/dh/dh_err.c
crypto/dsa/dsa_err.c
crypto/dso/dso_err.c
crypto/ec/ec.h
crypto/ec/ec_err.c
crypto/ecdh/ech_err.c
crypto/ecdsa/ecs_err.c
crypto/engine/eng_err.c
crypto/evp/evp_err.c
crypto/objects/obj_err.c
crypto/ocsp/ocsp.h
crypto/ocsp/ocsp_err.c
crypto/pem/pem_err.c
crypto/pkcs12/pk12err.c
crypto/pkcs7/pkcs7err.c
crypto/rand/rand_err.c
crypto/rsa/rsa.h
crypto/rsa/rsa_err.c
crypto/store/str_err.c
crypto/ts/ts_err.c
crypto/ui/ui_err.c
crypto/x509/x509_err.c
crypto/x509v3/v3err.c
ssl/ssl_err.c
util/mkerr.pl

diff --git a/CHANGES b/CHANGES
index e672750b2de823e4dcb95b02afeeca8ed8a4bb0e..c73798f4d9ce217e833e8b905f5112b334388a00 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  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
index 2890b4fa80e1aa67937a629415399d9f4c807bfd..2cb64aefcaa177ed0e4503a952e8a53f65884748 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -123,7 +123,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {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"},
@@ -168,9 +168,10 @@ static ERR_STRING_DATA ASN1_str_functs[]=
 {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"},
@@ -290,15 +291,12 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
 
 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
        }
index 426f8d13c6bde15d30a45637b98a8beb302e12f6..a224edd5a0a77a49d638e913fddc4b26b75dedbc 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -143,15 +143,12 @@ static ERR_STRING_DATA BIO_str_reasons[]=
 
 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
        }
index a253959a5c94a2b30b77a060a281b09720407fc0..a02df0adebcccf28fb5e68fdcefdc08cb42b3f45 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -137,15 +137,12 @@ static ERR_STRING_DATA BN_str_reasons[]=
 
 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
        }
index 8fc67d354282876067907684985cf3f76aee16b6..8f1de6192be49023708c10170c63b91aa3202754 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -88,15 +88,12 @@ static ERR_STRING_DATA BUF_str_reasons[]=
 
 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
        }
index bf7aa3af762bfb95f76c724a7ceb3f5ad763ef91..aad3235cf3dcfbbf873261b5d1508fcc2f7cd733 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -82,15 +82,12 @@ static ERR_STRING_DATA COMP_str_reasons[]=
 
 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
        }
index 62506897462eebd902e5540f840b39de959cc87d..bc378a7704a133db7596dc1e8345b9ef0630804b 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -118,15 +118,12 @@ static ERR_STRING_DATA CONF_str_reasons[]=
 
 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
        }
index 06a6109cceeddfcf55a206a47df4ff2bdfb9a259..139b9284e4f725915e05b82787d525023ec94a3a 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -92,15 +92,12 @@ static ERR_STRING_DATA CRYPTO_str_reasons[]=
 
 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
        }
index 86499b4c7e384a3632c2c4e03a1cc42f43e56f48..b0332f2c0c215dcb937caef5f13dc3e84a352c01 100644 (file)
@@ -227,7 +227,6 @@ void ERR_load_DH_strings(void);
 
 /* 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
@@ -236,6 +235,7 @@ void ERR_load_DH_strings(void);
 #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
index ea5aeedd937ac65915be7c32d3e3cc71d5295cf0..d5cf0c22a35deedcd0ee06579d963a12fdea881c 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -106,15 +106,12 @@ static ERR_STRING_DATA DH_str_reasons[]=
 
 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
        }
index 92ccb62e44d9e60b5fe85ca145ee01be8c9a4a01..bba984e92ede965f3cc7dbef513686de7901200d 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -114,15 +114,12 @@ static ERR_STRING_DATA DSA_str_reasons[]=
 
 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
        }
index 7b6cf4eb0a3bba8b8a5c324397a0a1bbce4fa853..2bb07c25143ab6c4502706b157311a1d7d6cc23c 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -148,15 +148,12 @@ static ERR_STRING_DATA DSO_str_reasons[]=
 
 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
        }
index 2348e4c4cb674d5b835022e959e7695f541c6c89..26d92a569ec9966b059631dff984e067afbc7122 100644 (file)
@@ -1011,7 +1011,6 @@ void ERR_load_EC_strings(void);
 #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
index 8db5195bcdfe5cdd98479ce4cd1e7f5f9b370e05..8514bcc9dfa1693e8b5c7d605f9b9882b5fd7929 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -155,7 +155,6 @@ static ERR_STRING_DATA EC_str_functs[]=
 {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"},
@@ -247,15 +246,12 @@ static ERR_STRING_DATA EC_str_reasons[]=
 
 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
        }
index 626f49ba330ba1d19f5513f4c2809dd5be1a2004..6f4b0c99536340a30e21230810204cac0519febd 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -87,15 +87,12 @@ static ERR_STRING_DATA ECDH_str_reasons[]=
 
 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
        }
index 7e85434c75c0d115ff6e0b6f52c71eef7d26e419..98e38d537f24c57714de613304a3cb954ba0d08b 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -93,15 +93,12 @@ static ERR_STRING_DATA ECDSA_str_reasons[]=
 
 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
        }
index 70fbc4de1e0eefaac64ff3a74cec0e069d82a3f0..bc755ff05035796a93851669954636efa1f3d5a5 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -160,15 +160,12 @@ static ERR_STRING_DATA ENGINE_str_reasons[]=
 
 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
        }
index 4ead16cba6bebc01a7150e92c630c716322e3630..a93056828ec90f7cf6c6bd1e4936cc75213a71c8 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -200,15 +200,12 @@ static ERR_STRING_DATA EVP_str_reasons[]=
 
 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
        }
index 0682979b38159a3f58ceb0c6fef71cc56433c970..2e7a034c3fd55d7a010c59e1f7d0ad059c1724b7 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -91,15 +91,12 @@ static ERR_STRING_DATA OBJ_str_reasons[]=
 
 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
        }
index 5eee6071fe18198db2ac418da8cfd323356bafb7..8c18c57fd570983a5f39a97afcbbced533f50d88 100644 (file)
@@ -574,13 +574,13 @@ void ERR_load_OCSP_strings(void);
 #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. */
index df93e454033fb861efecfb79a874b61ec5e46fe2..0cedcea6820460edfd9d26f552576765e701bbe0 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -131,15 +131,12 @@ static ERR_STRING_DATA OCSP_str_reasons[]=
 
 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
        }
index 0de5264aa10c872a45db43985368bb0330b44035..3318fab533d1f310f0020808cbed9b31e0918b2d 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -107,8 +107,8 @@ static ERR_STRING_DATA PEM_str_functs[]=
 {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}
        };
@@ -149,15 +149,12 @@ static ERR_STRING_DATA PEM_str_reasons[]=
 
 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
        }
index 5c92cb08e0c7df8bb5789237ec7b3cbf16984b04..f6ddf2df12ebcbb0fee9d29afad262c9c1ac94d1 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -133,15 +133,12 @@ static ERR_STRING_DATA PKCS12_str_reasons[]=
 
 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
        }
index 2cb77071a01080cbc55c0385699b93387abf1ab9..4109ccd2bdff83be95b7e5e02628b7326750c40f 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -82,7 +82,7 @@ static ERR_STRING_DATA PKCS7_str_functs[]=
 {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"},
@@ -94,7 +94,7 @@ static ERR_STRING_DATA PKCS7_str_functs[]=
 {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"},
@@ -175,15 +175,12 @@ static ERR_STRING_DATA PKCS7_str_reasons[]=
 
 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
        }
index b2f2448b667c8d0956f454e817f2be1056d9faf1..03cda4dd9214dec1495e9ea05068fd379c4ba794 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -85,15 +85,12 @@ static ERR_STRING_DATA RAND_str_reasons[]=
 
 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
        }
index 7f9e10891e205480708f02c739304cb1aac81064..260fa43efe729a888cacbde7e50492c3df18b1d0 100644 (file)
@@ -383,7 +383,7 @@ void ERR_load_RSA_strings(void);
 /* 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
@@ -426,7 +426,7 @@ void ERR_load_RSA_strings(void);
 #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
 
@@ -450,7 +450,6 @@ void ERR_load_RSA_strings(void);
 #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
index c844aeb91109d96daf93747658f0551ad3f82731..b7ac4d2c215fadaf739e663801aea345066b7615 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -108,7 +108,7 @@ static ERR_STRING_DATA RSA_str_functs[]=
 {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"},
@@ -142,7 +142,6 @@ static ERR_STRING_DATA RSA_str_reasons[]=
 {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"},
@@ -179,15 +178,12 @@ static ERR_STRING_DATA RSA_str_reasons[]=
 
 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
        }
index 5c6fe832e860b045225382a8915c28dc985e8afa..924edf050581936a2138b8929434a98b7a4909f0 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -200,15 +200,12 @@ static ERR_STRING_DATA STORE_str_reasons[]=
 
 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
        }
index ea7272b9345c381fb270cf41b3af0b74389c3d09..cc9881eae65ea1db2f7176c012d4357b29ece436 100644 (file)
 
 /* 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}
        };
 
@@ -162,15 +166,12 @@ static ERR_STRING_DATA TS_str_reasons[]=
 
 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
        }
index d983cdd66fac0069a79789568b2e5feb0420be89..a6b96299a0f4ddc0d9354de1643c6c43bc38e8cb 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -101,15 +101,12 @@ static ERR_STRING_DATA UI_str_reasons[]=
 
 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
        }
index b6b5926a3bd7ad4ac7ee913aa4f9871f9dbb926e..a01402f41673083bf39174650020bab54ac43571 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -153,15 +153,12 @@ static ERR_STRING_DATA X509_str_reasons[]=
 
 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
        }
index 8a49447d3372434253be7ed803b80a26ef61f0a0..836a32472797cbc575486af681b5a08bb4d21e63 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -96,12 +96,12 @@ static ERR_STRING_DATA X509V3_str_functs[]=
 {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"},
@@ -123,10 +123,10 @@ static ERR_STRING_DATA X509V3_str_functs[]=
 {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}
@@ -203,15 +203,12 @@ static ERR_STRING_DATA X509V3_str_reasons[]=
 
 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
        }
index 0b0e2fa0172747e4d5a4f522a96ba8dc9b393bab..cb26f19a5cd28f514dacb34ba9b241d791dcdf53 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -208,7 +208,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
 {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"},
@@ -514,15 +514,12 @@ static ERR_STRING_DATA SSL_str_reasons[]=
 
 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
        }
index d8053b092f633264cfd4c1db8f2ce0c2a550b7fc..d1e9a2b948d69414ee0e8c5b0317fa4fa3c30efe 100644 (file)
@@ -139,6 +139,8 @@ while (($hdr, $lib) = each %libinc)
 
        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;
@@ -151,6 +153,9 @@ while (($hdr, $lib) = each %libinc)
            # 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) {
@@ -453,10 +458,17 @@ EOF
                        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 =~ /([^\/]+)$/;
@@ -485,7 +497,7 @@ EOF
        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
@@ -599,17 +611,14 @@ if($static) {
 
 ${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 {