Remove OPENSSL_FIPSCANISTER code.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 18 Oct 2014 22:59:37 +0000 (23:59 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 8 Dec 2014 13:25:16 +0000 (13:25 +0000)
OPENSSL_FIPSCANISTER is only set if the fips module is being built
(as opposed to being used). Since the fips module wont be built in
master this is redundant.
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/arm_arch.h
crypto/bn/bn_asm.c
crypto/cryptlib.c
crypto/crypto.h
crypto/ecdh/ech_ossl.c
crypto/ecdsa/ecs_ossl.c
e_os.h

index 6fa87244d1b929fb56ca1d87cd384e59e0872a28..d406c8c2295f5f52b334941637c340d185e52ba8 100644 (file)
 # endif
 #endif
 
 # endif
 #endif
 
-#ifdef OPENSSL_FIPSCANISTER
-#include <openssl/fipssyms.h>
-#endif
-
 #if !__ASSEMBLER__
 extern unsigned int OPENSSL_armcap_P;
 #endif
 #if !__ASSEMBLER__
 extern unsigned int OPENSSL_armcap_P;
 #endif
index 23766243be94504cd7e8fe11806a9c4db589865b..14eaf2c62d512d12b1164c419dd4c5eda18884d6 100644 (file)
@@ -428,12 +428,10 @@ BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
 
 #if defined(BN_MUL_COMBA) && !defined(OPENSSL_SMALL_FOOTPRINT)
 
 
 #if defined(BN_MUL_COMBA) && !defined(OPENSSL_SMALL_FOOTPRINT)
 
-#ifndef OPENSSL_FIPSCANISTER
 #undef bn_mul_comba8
 #undef bn_mul_comba4
 #undef bn_sqr_comba8
 #undef bn_sqr_comba4
 #undef bn_mul_comba8
 #undef bn_mul_comba4
 #undef bn_sqr_comba8
 #undef bn_sqr_comba4
-#endif
 
 /* mul_add_c(a,b,c0,c1,c2)  -- c+=a*b for three word number c=(c2,c1,c0) */
 /* mul_add_c2(a,b,c0,c1,c2) -- c+=2*a*b for three word number c=(c2,c1,c0) */
 
 /* mul_add_c(a,b,c0,c1,c2)  -- c+=a*b for three word number c=(c2,c1,c0) */
 /* mul_add_c2(a,b,c0,c1,c2) -- c+=2*a*b for three word number c=(c2,c1,c0) */
@@ -948,10 +946,8 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
 #else /* !BN_MUL_COMBA */
 
 /* hmm... is it faster just to do a multiply? */
 #else /* !BN_MUL_COMBA */
 
 /* hmm... is it faster just to do a multiply? */
-#ifndef OPENSSL_FIPSCANISTER
 #undef bn_sqr_comba4
 #undef bn_sqr_comba8
 #undef bn_sqr_comba4
 #undef bn_sqr_comba8
-#endif
 void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a)
        {
        BN_ULONG t[8];
 void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a)
        {
        BN_ULONG t[8];
index 897b5b5bc22a551e6ad21d82a3b21b39a885e9ec..07f68e684e7d44004a214b673d50caf7f843d08e 100644 (file)
@@ -394,9 +394,7 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
 #endif
        }
 
 #endif
        }
 
-#ifndef OPENSSL_FIPSCANISTER
 void *OPENSSL_stderr(void)     { return stderr; }
 void *OPENSSL_stderr(void)     { return stderr; }
-#endif
 
 int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
        {
 
 int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
        {
index 256220ba01e262f543897b7a76975f2ce648261d..4b542ce622a09f24d00ef3c92cd07ee905d2e6fe 100644 (file)
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
 #endif
 
-/* Get FIPS renames if needed */
-#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI)
-#include <openssl/fips.h>
-#endif
-
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
 #include <openssl/opensslv.h>
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
 #include <openssl/opensslv.h>
index 2656797449e7075cd910bd69deaf4c6c8012b3f5..e25fd4f1d35c9076a328c3cca59bfc18c8382ad5 100644 (file)
@@ -234,15 +234,3 @@ err:
        if (buf) OPENSSL_free(buf);
        return(ret);
        }
        if (buf) OPENSSL_free(buf);
        return(ret);
        }
-
-#ifdef OPENSSL_FIPSCANISTER
-/* FIPS stanadlone version of ecdh_check: just return FIPS method */
-ECDH_DATA *fips_ecdh_check(EC_KEY *key)
-       {
-       static ECDH_DATA rv = {
-               0,0,0,
-               &openssl_ecdh_meth
-               };
-       return &rv;
-       }
-#endif
index 97541a24b5feb2801b42d781408fab5385702c53..ec8e2523427442e752f8071fadd07f351bfe40ed 100644 (file)
@@ -561,32 +561,3 @@ err:
                EC_POINT_free(point);
        return ret;
 }
                EC_POINT_free(point);
        return ret;
 }
-
-#ifdef OPENSSL_FIPSCANISTER
-/* FIPS stanadlone version of ecdsa_check: just return FIPS method */
-ECDSA_DATA *fips_ecdsa_check(EC_KEY *key)
-       {
-       static ECDSA_DATA rv = {
-               0,0,0,
-               &openssl_ecdsa_meth
-               };
-       return &rv;
-       }
-/* Standalone digest sign and verify */
-int FIPS_ecdsa_verify_digest(EC_KEY *key,
-                       const unsigned char *dig, int dlen, ECDSA_SIG *s)
-       {
-       ECDSA_DATA *ecdsa = ecdsa_check(key);
-       if (ecdsa == NULL)
-               return 0;
-       return ecdsa->meth->ecdsa_do_verify(dig, dlen, s, key);
-       }
-ECDSA_SIG * FIPS_ecdsa_sign_digest(EC_KEY *key,
-                                       const unsigned char *dig, int dlen)
-       {
-       ECDSA_DATA *ecdsa = ecdsa_check(key);
-       if (ecdsa == NULL)
-               return NULL;
-       return ecdsa->meth->ecdsa_do_sign(dig, dlen, NULL, NULL, key);
-       }
-#endif
diff --git a/e_os.h b/e_os.h
index 141eda67cb24b6a83ee70cb8128b64b6c72e11b1..d0217f1863cfb85e9e5f714a03f086da859e052e 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -316,10 +316,8 @@ static __inline unsigned int _strlen31(const char *str)
 #      endif
 #    endif
 #  endif
 #      endif
 #    endif
 #  endif
-#  if !defined(OPENSSL_FIPSCANISTER)
 #    include <io.h>
 #    include <fcntl.h>
 #    include <io.h>
 #    include <fcntl.h>
-#  endif
 
 #  ifdef OPENSSL_SYS_WINCE
 #    define OPENSSL_NO_POSIX_IO
 
 #  ifdef OPENSSL_SYS_WINCE
 #    define OPENSSL_NO_POSIX_IO