Remove all error string tables out of fipscanister.o, reorganise
authorDr. Stephen Henson <steve@openssl.org>
Sat, 3 Feb 2007 17:19:43 +0000 (17:19 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 3 Feb 2007 17:19:43 +0000 (17:19 +0000)
ERR and SYS error code files to achieve this.

13 files changed:
CHANGES
crypto/Makefile
crypto/dh/dh.h
crypto/dh/dh_err.c
crypto/err/Makefile
crypto/err/err.c
crypto/err/err_str.c [new file with mode: 0644]
crypto/err/openssl.ec
crypto/fips_err.c [new file with mode: 0644]
crypto/fips_err.h [new file with mode: 0644]
fips-1.0/Makefile
fips-1.0/fips_err.h [deleted file]
fips-1.0/fips_err_wrapper.c [deleted file]

diff --git a/CHANGES b/CHANGES
index 0b2d7c1701ba99a56f68cb058ee241a245764464..4106f0d706eb908c05f7d4cd2abfb102deb9aae4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  Changes between 0.9.7l and 0.9.7m-fips2 [xx XXX xxxx]
 
+  *) Move error strings for remaing libraries into separate files to avoid 
+     unnecessary dependencies for fipscanister.o which doesn't require the
+     loading of error strings.
+     [Steve Henson]
+
   *) New build option fipsdso to link fipscanister.o into a DSO called 
      libfips.so and modify build system to link against it. Preliminary changes
      to VC++ build system to accomodate fipsdso.
index cda9de0ac98f0edf3c4c97a5a25ae0ab416e009e..04d3583930b78bb22dfd9c79256817d199aff7e4 100644 (file)
@@ -35,8 +35,8 @@ GENERAL=Makefile README crypto-lib.com install.com
 
 LIB= $(TOP)/libcrypto.a
 SHARED_LIB= libcrypto$(SHLIB_EXT)
-LIBSRC=        cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c
-LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o
+LIBSRC=        cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c fips_err.c
+LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o fips_err.o
 
 SRC= $(LIBSRC)
 
index fe47553112964149f277baff174a22888916ba4f..10e414eb65cc88a53d08f2b527902de5f6e91c46 100644 (file)
@@ -210,8 +210,8 @@ void ERR_load_DH_strings(void);
 
 /* Reason codes. */
 #define DH_R_BAD_GENERATOR                              101
+#define DH_R_MODULUS_TOO_LARGE                          103
 #define DH_R_NO_PRIVATE_VALUE                           100
-#define DH_R_MODULUS_TOO_LARGE                           103
 
 #ifdef  __cplusplus
 }
index b2a5708d36d39dca4a0f2cce29f12c5795ca25f4..be8011a6fa5aee1aa699030fea949f23cdbeea6b 100644 (file)
@@ -82,7 +82,7 @@ static ERR_STRING_DATA DH_str_functs[]=
 static ERR_STRING_DATA DH_str_reasons[]=
        {
 {ERR_REASON(DH_R_BAD_GENERATOR)          ,"bad generator"},
-{ERR_REASON(DH_R_MODULUS_TOO_LARGE)      ,"modulus too large"},               
+{ERR_REASON(DH_R_MODULUS_TOO_LARGE)      ,"modulus too large"},
 {ERR_REASON(DH_R_NO_PRIVATE_VALUE)       ,"no private value"},
 {0,NULL}
        };
index 4adec553023bb353b0f38ef89c49f4d5607a9e20..eedfed6658314e368bdc85be7ddde7824abcbc96 100644 (file)
@@ -22,8 +22,8 @@ TEST=
 APPS=
 
 LIB=$(TOP)/libcrypto.a
-LIBSRC=err.c err_all.c err_prn.c
-LIBOBJ=err.o err_all.o err_prn.o
+LIBSRC=err.c err_all.c err_prn.c err_str.c
+LIBOBJ=err.o err_all.o err_prn.o err_str.o
 
 SRC= $(LIBSRC)
 
index 8875beacffebdafd466bdc3bade59be274f14f35..ed01f43a67ffe2d46d2428bdacf6efb63fc7e431 100644 (file)
 static void err_load_strings(int lib, ERR_STRING_DATA *str);
 
 static void ERR_STATE_free(ERR_STATE *s);
-#ifndef OPENSSL_NO_ERR
-static ERR_STRING_DATA ERR_str_libraries[]=
-       {
-{ERR_PACK(ERR_LIB_NONE,0,0)            ,"unknown library"},
-{ERR_PACK(ERR_LIB_SYS,0,0)             ,"system library"},
-{ERR_PACK(ERR_LIB_BN,0,0)              ,"bignum routines"},
-{ERR_PACK(ERR_LIB_RSA,0,0)             ,"rsa routines"},
-{ERR_PACK(ERR_LIB_DH,0,0)              ,"Diffie-Hellman routines"},
-{ERR_PACK(ERR_LIB_EVP,0,0)             ,"digital envelope routines"},
-{ERR_PACK(ERR_LIB_BUF,0,0)             ,"memory buffer routines"},
-{ERR_PACK(ERR_LIB_OBJ,0,0)             ,"object identifier routines"},
-{ERR_PACK(ERR_LIB_PEM,0,0)             ,"PEM routines"},
-{ERR_PACK(ERR_LIB_DSA,0,0)             ,"dsa routines"},
-{ERR_PACK(ERR_LIB_X509,0,0)            ,"x509 certificate routines"},
-{ERR_PACK(ERR_LIB_ASN1,0,0)            ,"asn1 encoding routines"},
-{ERR_PACK(ERR_LIB_CONF,0,0)            ,"configuration file routines"},
-{ERR_PACK(ERR_LIB_CRYPTO,0,0)          ,"common libcrypto routines"},
-{ERR_PACK(ERR_LIB_EC,0,0)              ,"elliptic curve routines"},
-{ERR_PACK(ERR_LIB_SSL,0,0)             ,"SSL routines"},
-{ERR_PACK(ERR_LIB_BIO,0,0)             ,"BIO routines"},
-{ERR_PACK(ERR_LIB_PKCS7,0,0)           ,"PKCS7 routines"},
-{ERR_PACK(ERR_LIB_X509V3,0,0)          ,"X509 V3 routines"},
-{ERR_PACK(ERR_LIB_PKCS12,0,0)          ,"PKCS12 routines"},
-{ERR_PACK(ERR_LIB_RAND,0,0)            ,"random number generator"},
-{ERR_PACK(ERR_LIB_DSO,0,0)             ,"DSO support routines"},
-{ERR_PACK(ERR_LIB_ENGINE,0,0)          ,"engine routines"},
-{ERR_PACK(ERR_LIB_OCSP,0,0)            ,"OCSP routines"},
-{ERR_PACK(ERR_LIB_FIPS,0,0)            ,"FIPS routines"},
-{0,NULL},
-       };
-
-static ERR_STRING_DATA ERR_str_functs[]=
-       {
-       {ERR_PACK(0,SYS_F_FOPEN,0),             "fopen"},
-       {ERR_PACK(0,SYS_F_CONNECT,0),           "connect"},
-       {ERR_PACK(0,SYS_F_GETSERVBYNAME,0),     "getservbyname"},
-       {ERR_PACK(0,SYS_F_SOCKET,0),            "socket"}, 
-       {ERR_PACK(0,SYS_F_IOCTLSOCKET,0),       "ioctlsocket"},
-       {ERR_PACK(0,SYS_F_BIND,0),              "bind"},
-       {ERR_PACK(0,SYS_F_LISTEN,0),            "listen"},
-       {ERR_PACK(0,SYS_F_ACCEPT,0),            "accept"},
-#ifdef OPENSSL_SYS_WINDOWS
-       {ERR_PACK(0,SYS_F_WSASTARTUP,0),        "WSAstartup"},
-#endif
-       {ERR_PACK(0,SYS_F_OPENDIR,0),           "opendir"},
-       {ERR_PACK(0,SYS_F_FREAD,0),             "fread"},
-       {ERR_PACK(0,SYS_F_GETADDRINFO,0),       "getaddrinfo"},
-       {0,NULL},
-       };
-
-static ERR_STRING_DATA ERR_str_reasons[]=
-       {
-{ERR_R_SYS_LIB                         ,"system lib"},
-{ERR_R_BN_LIB                          ,"BN lib"},
-{ERR_R_RSA_LIB                         ,"RSA lib"},
-{ERR_R_DH_LIB                          ,"DH lib"},
-{ERR_R_EVP_LIB                         ,"EVP lib"},
-{ERR_R_BUF_LIB                         ,"BUF lib"},
-{ERR_R_OBJ_LIB                         ,"OBJ lib"},
-{ERR_R_PEM_LIB                         ,"PEM lib"},
-{ERR_R_DSA_LIB                         ,"DSA lib"},
-{ERR_R_X509_LIB                                ,"X509 lib"},
-{ERR_R_ASN1_LIB                                ,"ASN1 lib"},
-{ERR_R_CONF_LIB                                ,"CONF lib"},
-{ERR_R_CRYPTO_LIB                      ,"CRYPTO lib"},
-{ERR_R_EC_LIB                          ,"EC lib"},
-{ERR_R_SSL_LIB                         ,"SSL lib"},
-{ERR_R_BIO_LIB                         ,"BIO lib"},
-{ERR_R_PKCS7_LIB                       ,"PKCS7 lib"},
-{ERR_R_X509V3_LIB                      ,"X509V3 lib"},
-{ERR_R_PKCS12_LIB                      ,"PKCS12 lib"},
-{ERR_R_RAND_LIB                                ,"RAND lib"},
-{ERR_R_DSO_LIB                         ,"DSO lib"},
-{ERR_R_ENGINE_LIB                      ,"ENGINE lib"},
-{ERR_R_OCSP_LIB                                ,"OCSP lib"},
-
-{ERR_R_NESTED_ASN1_ERROR               ,"nested asn1 error"},
-{ERR_R_BAD_ASN1_OBJECT_HEADER          ,"bad asn1 object header"},
-{ERR_R_BAD_GET_ASN1_OBJECT_CALL                ,"bad get asn1 object call"},
-{ERR_R_EXPECTING_AN_ASN1_SEQUENCE      ,"expecting an asn1 sequence"},
-{ERR_R_ASN1_LENGTH_MISMATCH            ,"asn1 length mismatch"},
-{ERR_R_MISSING_ASN1_EOS                        ,"missing asn1 eos"},
-
-{ERR_R_FATAL                            ,"fatal"},
-{ERR_R_MALLOC_FAILURE                  ,"malloc failure"},
-{ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED     ,"called a function you should not call"},
-{ERR_R_PASSED_NULL_PARAMETER           ,"passed a null parameter"},
-{ERR_R_INTERNAL_ERROR                  ,"internal error"},
-
-{0,NULL},
-       };
-#endif
-
 
 /* Define the predeclared (but externally opaque) "ERR_FNS" type */
 struct st_ERR_FNS
@@ -528,71 +435,6 @@ static int int_err_get_next_lib(void)
        }
 
 
-#ifndef OPENSSL_NO_ERR
-#define NUM_SYS_STR_REASONS 127
-#define LEN_SYS_STR_REASON 32
-
-static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1];
-/* SYS_str_reasons is filled with copies of strerror() results at
- * initialization.
- * 'errno' values up to 127 should cover all usual errors,
- * others will be displayed numerically by ERR_error_string.
- * It is crucial that we have something for each reason code
- * that occurs in ERR_str_reasons, or bogus reason strings
- * will be returned for SYSerr(), which always gets an errno
- * value and never one of those 'standard' reason codes. */
-
-static void build_SYS_str_reasons()
-       {
-       /* OPENSSL_malloc cannot be used here, use static storage instead */
-       static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON];
-       int i;
-       static int init = 1;
-
-       CRYPTO_r_lock(CRYPTO_LOCK_ERR);
-       if (!init)
-               {
-               CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
-               return;
-               }
-       
-       CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
-       CRYPTO_w_lock(CRYPTO_LOCK_ERR);
-       if (!init)
-               {
-               CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
-               return;
-               }
-
-       for (i = 1; i <= NUM_SYS_STR_REASONS; i++)
-               {
-               ERR_STRING_DATA *str = &SYS_str_reasons[i - 1];
-
-               str->error = (unsigned long)i;
-               if (str->string == NULL)
-                       {
-                       char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]);
-                       char *src = strerror(i);
-                       if (src != NULL)
-                               {
-                               strncpy(*dest, src, sizeof *dest);
-                               (*dest)[sizeof *dest - 1] = '\0';
-                               str->string = *dest;
-                               }
-                       }
-               if (str->string == NULL)
-                       str->string = "unknown";
-               }
-
-       /* Now we still have SYS_str_reasons[NUM_SYS_STR_REASONS] = {0, NULL},
-        * as required by ERR_load_strings. */
-
-       init = 0;
-       
-       CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
-       }
-#endif
-
 #define err_clear_data(p,i) \
        if (((p)->err_data[i] != NULL) && \
                (p)->err_data_flags[i] & ERR_TXT_MALLOCED) \
@@ -616,18 +458,6 @@ static void ERR_STATE_free(ERR_STATE *s)
        OPENSSL_free(s);
        }
 
-void ERR_load_ERR_strings(void)
-       {
-       err_fns_check();
-#ifndef OPENSSL_NO_ERR
-       err_load_strings(0,ERR_str_libraries);
-       err_load_strings(0,ERR_str_reasons);
-       err_load_strings(ERR_LIB_SYS,ERR_str_functs);
-       build_SYS_str_reasons();
-       err_load_strings(ERR_LIB_SYS,SYS_str_reasons);
-#endif
-       }
-
 static void err_load_strings(int lib, ERR_STRING_DATA *str)
        {
        while (str->error)
@@ -641,7 +471,7 @@ static void err_load_strings(int lib, ERR_STRING_DATA *str)
 
 void ERR_load_strings(int lib, ERR_STRING_DATA *str)
        {
-       ERR_load_ERR_strings();
+       err_fns_check();
        err_load_strings(lib, str);
        }
 
diff --git a/crypto/err/err_str.c b/crypto/err/err_str.c
new file mode 100644 (file)
index 0000000..99d1c02
--- /dev/null
@@ -0,0 +1,296 @@
+/* crypto/err/err_str.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+/* ====================================================================
+ * Copyright (c) 1998-2001 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
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission. For written permission, please contact
+ *    openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ *    nor may "OpenSSL" appear in their names without prior written
+ *    permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com).  This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <openssl/lhash.h>
+#include <openssl/crypto.h>
+#include "cryptlib.h"
+#include <openssl/buffer.h>
+#include <openssl/bio.h>
+#include <openssl/err.h>
+
+
+#ifndef OPENSSL_NO_ERR
+static ERR_STRING_DATA ERR_str_libraries[]=
+       {
+{ERR_PACK(ERR_LIB_NONE,0,0)            ,"unknown library"},
+{ERR_PACK(ERR_LIB_SYS,0,0)             ,"system library"},
+{ERR_PACK(ERR_LIB_BN,0,0)              ,"bignum routines"},
+{ERR_PACK(ERR_LIB_RSA,0,0)             ,"rsa routines"},
+{ERR_PACK(ERR_LIB_DH,0,0)              ,"Diffie-Hellman routines"},
+{ERR_PACK(ERR_LIB_EVP,0,0)             ,"digital envelope routines"},
+{ERR_PACK(ERR_LIB_BUF,0,0)             ,"memory buffer routines"},
+{ERR_PACK(ERR_LIB_OBJ,0,0)             ,"object identifier routines"},
+{ERR_PACK(ERR_LIB_PEM,0,0)             ,"PEM routines"},
+{ERR_PACK(ERR_LIB_DSA,0,0)             ,"dsa routines"},
+{ERR_PACK(ERR_LIB_X509,0,0)            ,"x509 certificate routines"},
+{ERR_PACK(ERR_LIB_ASN1,0,0)            ,"asn1 encoding routines"},
+{ERR_PACK(ERR_LIB_CONF,0,0)            ,"configuration file routines"},
+{ERR_PACK(ERR_LIB_CRYPTO,0,0)          ,"common libcrypto routines"},
+{ERR_PACK(ERR_LIB_EC,0,0)              ,"elliptic curve routines"},
+{ERR_PACK(ERR_LIB_SSL,0,0)             ,"SSL routines"},
+{ERR_PACK(ERR_LIB_BIO,0,0)             ,"BIO routines"},
+{ERR_PACK(ERR_LIB_PKCS7,0,0)           ,"PKCS7 routines"},
+{ERR_PACK(ERR_LIB_X509V3,0,0)          ,"X509 V3 routines"},
+{ERR_PACK(ERR_LIB_PKCS12,0,0)          ,"PKCS12 routines"},
+{ERR_PACK(ERR_LIB_RAND,0,0)            ,"random number generator"},
+{ERR_PACK(ERR_LIB_DSO,0,0)             ,"DSO support routines"},
+{ERR_PACK(ERR_LIB_ENGINE,0,0)          ,"engine routines"},
+{ERR_PACK(ERR_LIB_OCSP,0,0)            ,"OCSP routines"},
+{ERR_PACK(ERR_LIB_FIPS,0,0)            ,"FIPS routines"},
+{0,NULL},
+       };
+
+static ERR_STRING_DATA ERR_str_functs[]=
+       {
+       {ERR_PACK(0,SYS_F_FOPEN,0),             "fopen"},
+       {ERR_PACK(0,SYS_F_CONNECT,0),           "connect"},
+       {ERR_PACK(0,SYS_F_GETSERVBYNAME,0),     "getservbyname"},
+       {ERR_PACK(0,SYS_F_SOCKET,0),            "socket"}, 
+       {ERR_PACK(0,SYS_F_IOCTLSOCKET,0),       "ioctlsocket"},
+       {ERR_PACK(0,SYS_F_BIND,0),              "bind"},
+       {ERR_PACK(0,SYS_F_LISTEN,0),            "listen"},
+       {ERR_PACK(0,SYS_F_ACCEPT,0),            "accept"},
+#ifdef OPENSSL_SYS_WINDOWS
+       {ERR_PACK(0,SYS_F_WSASTARTUP,0),        "WSAstartup"},
+#endif
+       {ERR_PACK(0,SYS_F_OPENDIR,0),           "opendir"},
+       {ERR_PACK(0,SYS_F_FREAD,0),             "fread"},
+       {ERR_PACK(0,SYS_F_GETADDRINFO,0),       "getaddrinfo"},
+       {0,NULL},
+       };
+
+static ERR_STRING_DATA ERR_str_reasons[]=
+       {
+{ERR_R_SYS_LIB                         ,"system lib"},
+{ERR_R_BN_LIB                          ,"BN lib"},
+{ERR_R_RSA_LIB                         ,"RSA lib"},
+{ERR_R_DH_LIB                          ,"DH lib"},
+{ERR_R_EVP_LIB                         ,"EVP lib"},
+{ERR_R_BUF_LIB                         ,"BUF lib"},
+{ERR_R_OBJ_LIB                         ,"OBJ lib"},
+{ERR_R_PEM_LIB                         ,"PEM lib"},
+{ERR_R_DSA_LIB                         ,"DSA lib"},
+{ERR_R_X509_LIB                                ,"X509 lib"},
+{ERR_R_ASN1_LIB                                ,"ASN1 lib"},
+{ERR_R_CONF_LIB                                ,"CONF lib"},
+{ERR_R_CRYPTO_LIB                      ,"CRYPTO lib"},
+{ERR_R_EC_LIB                          ,"EC lib"},
+{ERR_R_SSL_LIB                         ,"SSL lib"},
+{ERR_R_BIO_LIB                         ,"BIO lib"},
+{ERR_R_PKCS7_LIB                       ,"PKCS7 lib"},
+{ERR_R_X509V3_LIB                      ,"X509V3 lib"},
+{ERR_R_PKCS12_LIB                      ,"PKCS12 lib"},
+{ERR_R_RAND_LIB                                ,"RAND lib"},
+{ERR_R_DSO_LIB                         ,"DSO lib"},
+{ERR_R_ENGINE_LIB                      ,"ENGINE lib"},
+{ERR_R_OCSP_LIB                                ,"OCSP lib"},
+
+{ERR_R_NESTED_ASN1_ERROR               ,"nested asn1 error"},
+{ERR_R_BAD_ASN1_OBJECT_HEADER          ,"bad asn1 object header"},
+{ERR_R_BAD_GET_ASN1_OBJECT_CALL                ,"bad get asn1 object call"},
+{ERR_R_EXPECTING_AN_ASN1_SEQUENCE      ,"expecting an asn1 sequence"},
+{ERR_R_ASN1_LENGTH_MISMATCH            ,"asn1 length mismatch"},
+{ERR_R_MISSING_ASN1_EOS                        ,"missing asn1 eos"},
+
+{ERR_R_FATAL                            ,"fatal"},
+{ERR_R_MALLOC_FAILURE                  ,"malloc failure"},
+{ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED     ,"called a function you should not call"},
+{ERR_R_PASSED_NULL_PARAMETER           ,"passed a null parameter"},
+{ERR_R_INTERNAL_ERROR                  ,"internal error"},
+
+{0,NULL},
+       };
+#endif
+
+
+#ifndef OPENSSL_NO_ERR
+#define NUM_SYS_STR_REASONS 127
+#define LEN_SYS_STR_REASON 32
+
+static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1];
+/* SYS_str_reasons is filled with copies of strerror() results at
+ * initialization.
+ * 'errno' values up to 127 should cover all usual errors,
+ * others will be displayed numerically by ERR_error_string.
+ * It is crucial that we have something for each reason code
+ * that occurs in ERR_str_reasons, or bogus reason strings
+ * will be returned for SYSerr(), which always gets an errno
+ * value and never one of those 'standard' reason codes. */
+
+static void build_SYS_str_reasons()
+       {
+       /* OPENSSL_malloc cannot be used here, use static storage instead */
+       static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON];
+       int i;
+       static int init = 1;
+
+       CRYPTO_r_lock(CRYPTO_LOCK_ERR);
+       if (!init)
+               {
+               CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
+               return;
+               }
+       
+       CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
+       CRYPTO_w_lock(CRYPTO_LOCK_ERR);
+       if (!init)
+               {
+               CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
+               return;
+               }
+
+       for (i = 1; i <= NUM_SYS_STR_REASONS; i++)
+               {
+               ERR_STRING_DATA *str = &SYS_str_reasons[i - 1];
+
+               str->error = (unsigned long)i;
+               if (str->string == NULL)
+                       {
+                       char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]);
+                       char *src = strerror(i);
+                       if (src != NULL)
+                               {
+                               strncpy(*dest, src, sizeof *dest);
+                               (*dest)[sizeof *dest - 1] = '\0';
+                               str->string = *dest;
+                               }
+                       }
+               if (str->string == NULL)
+                       str->string = "unknown";
+               }
+
+       /* Now we still have SYS_str_reasons[NUM_SYS_STR_REASONS] = {0, NULL},
+        * as required by ERR_load_strings. */
+
+       init = 0;
+       
+       CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
+       }
+
+#endif
+
+void ERR_load_ERR_strings(void)
+       {
+#ifndef OPENSSL_NO_ERR
+       if (ERR_func_error_string(ERR_str_functs[0].error) == NULL)
+               {
+               ERR_load_strings(0,ERR_str_libraries);
+               ERR_load_strings(0,ERR_str_reasons);
+               ERR_load_strings(ERR_LIB_SYS,ERR_str_functs);
+               build_SYS_str_reasons();
+               ERR_load_strings(ERR_LIB_SYS,SYS_str_reasons);
+               }
+#endif
+       }
+
index f8cd6937e7e49b51ef9c26874a97daac306691c1..88d40c25b07f10fd0d460fc245c2d437fd9b2be5 100644 (file)
@@ -27,7 +27,7 @@ L DSO         crypto/dso/dso.h                crypto/dso/dso_err.c
 L ENGINE       crypto/engine/engine.h          crypto/engine/eng_err.c
 L OCSP         crypto/ocsp/ocsp.h              crypto/ocsp/ocsp_err.c
 L UI           crypto/ui/ui.h                  crypto/ui/ui_err.c
-L FIPS         fips-1.0/fips.h                 fips-1.0/fips_err.h
+L FIPS         fips-1.0/fips.h                 crypto/fips_err.c
 
 # additional header files to be scanned for function names
 L NONE         crypto/x509/x509_vfy.h          NONE
diff --git a/crypto/fips_err.c b/crypto/fips_err.c
new file mode 100644 (file)
index 0000000..09f1174
--- /dev/null
@@ -0,0 +1,7 @@
+#include <openssl/opensslconf.h>
+
+#ifdef OPENSSL_FIPS
+# include "fips_err.h"
+#else
+static void *dummy=&dummy;
+#endif
diff --git a/crypto/fips_err.h b/crypto/fips_err.h
new file mode 100644 (file)
index 0000000..448f157
--- /dev/null
@@ -0,0 +1,130 @@
+/* crypto/fips_err.c */
+/* ====================================================================
+ * 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
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission. For written permission, please contact
+ *    openssl-core@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ *    nor may "OpenSSL" appear in their names without prior written
+ *    permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com).  This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+/* NOTE: this file was auto generated by the mkerr.pl script: any changes
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
+ */
+
+#include <stdio.h>
+#include <openssl/err.h>
+#include <openssl/fips.h>
+
+/* BEGIN ERROR CODES */
+#ifndef OPENSSL_NO_ERR
+
+#define ERR_FUNC(func) ERR_PACK(ERR_LIB_FIPS,func,0)
+#define ERR_REASON(reason) ERR_PACK(ERR_LIB_FIPS,0,reason)
+
+static ERR_STRING_DATA FIPS_str_functs[]=
+       {
+{ERR_FUNC(FIPS_F_DH_GENERATE_PARAMETERS),      "DH_generate_parameters"},
+{ERR_FUNC(FIPS_F_DSA_DO_SIGN), "DSA_do_sign"},
+{ERR_FUNC(FIPS_F_DSA_DO_VERIFY),       "DSA_do_verify"},
+{ERR_FUNC(FIPS_F_DSA_GENERATE_PARAMETERS),     "DSA_generate_parameters"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_DSA),      "FIPS_CHECK_DSA"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_DSO),      "FIPS_CHECK_DSO"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_EXE),      "FIPS_CHECK_EXE"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_FINGERPRINT),      "FIPS_CHECK_FINGERPRINT"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_RSA),      "FIPS_CHECK_RSA"},
+{ERR_FUNC(FIPS_F_FIPS_DSA_CHECK),      "FIPS_dsa_check"},
+{ERR_FUNC(FIPS_F_FIPS_MODE_SET),       "FIPS_mode_set"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES),   "FIPS_selftest_aes"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_DES),   "FIPS_selftest_des"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_DSA),   "FIPS_selftest_dsa"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_RNG),   "FIPS_selftest_rng"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_RSA),   "FIPS_selftest_rsa"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_SHA),   "FIPS_SELFTEST_SHA"},
+{ERR_FUNC(FIPS_F_HASH_FINAL),  "HASH_FINAL"},
+{ERR_FUNC(FIPS_F_RSA_EAY_PUBLIC_ENCRYPT),      "RSA_EAY_PUBLIC_ENCRYPT"},
+{ERR_FUNC(FIPS_F_RSA_GENERATE_KEY),    "RSA_generate_key"},
+{ERR_FUNC(FIPS_F_RSA_X931_GENERATE_KEY),       "RSA_X931_generate_key"},
+{ERR_FUNC(FIPS_F_SSLEAY_RAND_BYTES),   "SSLEAY_RAND_BYTES"},
+{0,NULL}
+       };
+
+static ERR_STRING_DATA FIPS_str_reasons[]=
+       {
+{ERR_REASON(FIPS_R_CANNOT_READ_EXE)      ,"cannot read exe"},
+{ERR_REASON(FIPS_R_CANNOT_READ_EXE_DIGEST),"cannot read exe digest"},
+{ERR_REASON(FIPS_R_CONTRADICTING_EVIDENCE),"contradicting evidence"},
+{ERR_REASON(FIPS_R_EXE_DIGEST_DOES_NOT_MATCH),"exe digest does not match"},
+{ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH),"fingerprint does not match"},
+{ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED),"fingerprint does not match nonpic relocated"},
+{ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH_SEGMENT_ALIASING),"fingerprint does not match segment aliasing"},
+{ERR_REASON(FIPS_R_FIPS_MODE_ALREADY_SET),"fips mode already set"},
+{ERR_REASON(FIPS_R_FIPS_SELFTEST_FAILED) ,"fips selftest failed"},
+{ERR_REASON(FIPS_R_INVALID_KEY_LENGTH)   ,"invalid key length"},
+{ERR_REASON(FIPS_R_KEY_TOO_SHORT)        ,"key too short"},
+{ERR_REASON(FIPS_R_NON_FIPS_METHOD)      ,"non fips method"},
+{ERR_REASON(FIPS_R_PAIRWISE_TEST_FAILED) ,"pairwise test failed"},
+{ERR_REASON(FIPS_R_SELFTEST_FAILED)      ,"selftest failed"},
+{ERR_REASON(FIPS_R_UNSUPPORTED_PLATFORM) ,"unsupported platform"},
+{0,NULL}
+       };
+
+#endif
+
+void ERR_load_FIPS_strings(void)
+       {
+#ifndef OPENSSL_NO_ERR
+
+       if (ERR_func_error_string(FIPS_str_functs[0].error) == NULL)
+               {
+               ERR_load_strings(0,FIPS_str_functs);
+               ERR_load_strings(0,FIPS_str_reasons);
+               }
+#endif
+       }
index e318e3203ec85a0c862c9e1ccd1676c38df7cbf0..adb9bb79a26794921102469914955e489a5bff7f 100644 (file)
@@ -35,15 +35,15 @@ GENERAL=Makefile README fips-lib.com install.com
 
 LIB= $(TOP)/libcrypto.a
 SHARED_LIB= $(FIPSCANLIB)$(SHLIB_EXT)
-LIBSRC=fips.c fips_err_wrapper.c
-LIBOBJ=fips.o fips_err_wrapper.o
+LIBSRC=fips.c 
+LIBOBJ=fips.o
 
 FIPS_OBJ_LISTS=sha/lib hmac/lib rand/lib des/lib aes/lib dsa/lib rsa/lib dh/lib
 
 SRC= $(LIBSRC)
 
 EXHEADER=fips.h
-HEADER=$(EXHEADER) fips_err.h
+HEADER=$(EXHEADER)
 EXE=fipsld
 TEST=fips_test_suite.c
 
diff --git a/fips-1.0/fips_err.h b/fips-1.0/fips_err.h
deleted file mode 100644 (file)
index 9cd91d4..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/* fips-1.0/fips_err.h */
-/* ====================================================================
- * 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
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core@OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-
-/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file,
- * only reason strings will be preserved.
- */
-
-#include <stdio.h>
-#include <openssl/err.h>
-#include <openssl/fips.h>
-
-/* BEGIN ERROR CODES */
-#ifndef OPENSSL_NO_ERR
-
-#define ERR_FUNC(func) ERR_PACK(ERR_LIB_FIPS,func,0)
-#define ERR_REASON(reason) ERR_PACK(ERR_LIB_FIPS,0,reason)
-
-static ERR_STRING_DATA FIPS_str_functs[]=
-       {
-{ERR_FUNC(FIPS_F_DH_GENERATE_PARAMETERS),      "DH_generate_parameters"},
-{ERR_FUNC(FIPS_F_DSA_DO_SIGN), "DSA_do_sign"},
-{ERR_FUNC(FIPS_F_DSA_DO_VERIFY),       "DSA_do_verify"},
-{ERR_FUNC(FIPS_F_DSA_GENERATE_PARAMETERS),     "DSA_generate_parameters"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_DSA),      "FIPS_CHECK_DSA"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_DSO),      "FIPS_CHECK_DSO"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_EXE),      "FIPS_CHECK_EXE"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_FINGERPRINT),      "FIPS_CHECK_FINGERPRINT"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_RSA),      "FIPS_CHECK_RSA"},
-{ERR_FUNC(FIPS_F_FIPS_DSA_CHECK),      "FIPS_dsa_check"},
-{ERR_FUNC(FIPS_F_FIPS_MODE_SET),       "FIPS_mode_set"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES),   "FIPS_selftest_aes"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_DES),   "FIPS_selftest_des"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_DSA),   "FIPS_selftest_dsa"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_RNG),   "FIPS_selftest_rng"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_RSA),   "FIPS_selftest_rsa"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_SHA),   "FIPS_SELFTEST_SHA"},
-{ERR_FUNC(FIPS_F_HASH_FINAL),  "HASH_FINAL"},
-{ERR_FUNC(FIPS_F_RSA_EAY_PUBLIC_ENCRYPT),      "RSA_EAY_PUBLIC_ENCRYPT"},
-{ERR_FUNC(FIPS_F_RSA_GENERATE_KEY),    "RSA_generate_key"},
-{ERR_FUNC(FIPS_F_RSA_X931_GENERATE_KEY),       "RSA_X931_generate_key"},
-{ERR_FUNC(FIPS_F_SSLEAY_RAND_BYTES),   "SSLEAY_RAND_BYTES"},
-{0,NULL}
-       };
-
-static ERR_STRING_DATA FIPS_str_reasons[]=
-       {
-{ERR_REASON(FIPS_R_CANNOT_READ_EXE)      ,"cannot access executable object"},
-{ERR_REASON(FIPS_R_CANNOT_READ_EXE_DIGEST),"cannot access detached digest"},
-{ERR_REASON(FIPS_R_CONTRADICTING_EVIDENCE),"duplicate code detected, check your linking procedure"},
-{ERR_REASON(FIPS_R_EXE_DIGEST_DOES_NOT_MATCH),"detached digest verification failed"},
-{ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH),"fingerprint does not match"},
-{ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED),"fingerprint does not match, possibly because non-PIC was relocated"},
-{ERR_REASON(FIPS_R_FINGERPRINT_DOES_NOT_MATCH_SEGMENT_ALIASING),"fingerprint does not match, invalid segment aliasing"},
-{ERR_REASON(FIPS_R_FIPS_MODE_ALREADY_SET),"fips mode already set"},
-{ERR_REASON(FIPS_R_FIPS_SELFTEST_FAILED) ,"fips selftest failed"},
-{ERR_REASON(FIPS_R_INVALID_KEY_LENGTH)   ,"invalid key length"},
-{ERR_REASON(FIPS_R_KEY_TOO_SHORT)        ,"key too short"},
-{ERR_REASON(FIPS_R_NON_FIPS_METHOD)      ,"non fips method"},
-{ERR_REASON(FIPS_R_PAIRWISE_TEST_FAILED) ,"pairwise test failed"},
-{ERR_REASON(FIPS_R_SELFTEST_FAILED)      ,"selftest failed"},
-{ERR_REASON(FIPS_R_UNSUPPORTED_PLATFORM) ,"unsupported platform"},
-{0,NULL}
-       };
-
-#endif
-
-void ERR_load_FIPS_strings(void)
-       {
-#ifndef OPENSSL_NO_ERR
-
-       if (ERR_func_error_string(FIPS_str_functs[0].error) == NULL)
-               {
-               ERR_load_strings(0,FIPS_str_functs);
-               ERR_load_strings(0,FIPS_str_reasons);
-               }
-#endif
-       }
diff --git a/fips-1.0/fips_err_wrapper.c b/fips-1.0/fips_err_wrapper.c
deleted file mode 100644 (file)
index 09f1174..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <openssl/opensslconf.h>
-
-#ifdef OPENSSL_FIPS
-# include "fips_err.h"
-#else
-static void *dummy=&dummy;
-#endif