mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Remove OPENSSL_FIPSCANISTER code.
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>
This commit is contained in:
parent
225fce8a98
commit
c603c723ce
@ -48,10 +48,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_FIPSCANISTER
|
||||
#include <openssl/fipssyms.h>
|
||||
#endif
|
||||
|
||||
#if !__ASSEMBLER__
|
||||
extern unsigned int OPENSSL_armcap_P;
|
||||
#endif
|
||||
|
@ -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)
|
||||
|
||||
#ifndef OPENSSL_FIPSCANISTER
|
||||
#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) */
|
||||
@ -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? */
|
||||
#ifndef OPENSSL_FIPSCANISTER
|
||||
#undef bn_sqr_comba4
|
||||
#undef bn_sqr_comba8
|
||||
#endif
|
||||
void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG t[8];
|
||||
|
@ -394,9 +394,7 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_FIPSCANISTER
|
||||
void *OPENSSL_stderr(void) { return stderr; }
|
||||
#endif
|
||||
|
||||
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
|
||||
{
|
||||
|
@ -126,11 +126,6 @@
|
||||
#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>
|
||||
|
@ -234,15 +234,3 @@ err:
|
||||
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
|
||||
|
@ -561,32 +561,3 @@ err:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user