Use OPENSSL_FIPS instead of FIPS.

This commit is contained in:
Richard Levitte
2003-09-25 12:24:52 +00:00
parent 2667b068a1
commit 3b84ce3b6f
29 changed files with 47 additions and 46 deletions

View File

@@ -40,7 +40,7 @@
#include <openssl/fips.h>
#include "aes_locl.h"
#ifndef FIPS
#ifndef OPENSSL_FIPS
/*
Te0[x] = S [x].[02, 01, 01, 03];
@@ -1258,4 +1258,4 @@ void AES_decrypt(const unsigned char *in, unsigned char *out,
PUTU32(out + 12, s3);
}
#endif /* ndef FIPS */
#endif /* ndef OPENSSL_FIPS */

View File

@@ -66,10 +66,10 @@
static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
#endif
#ifdef FIPS
#ifdef OPENSSL_FIPS
int FIPS_mode;
void *FIPS_rand_check;
#endif /* def FIPS */
#endif /* def OPENSSL_FIPS */
DECLARE_STACK_OF(CRYPTO_dynlock)
IMPLEMENT_STACK_OF(CRYPTO_dynlock)

View File

@@ -58,7 +58,7 @@
#include "des_locl.h"
#ifndef FIPS
#ifndef OPENSSL_FIPS
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
{
@@ -289,7 +289,7 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
data[1]=r;
}
#endif /* ndef FIPS */
#endif /* ndef OPENSSL_FIPS */
#ifndef DES_DEFAULT_OPTIONS

View File

@@ -80,7 +80,7 @@
#include <openssl/rand.h>
#include <openssl/sha.h>
#ifndef FIPS
#ifndef OPENSSL_FIPS
DSA *DSA_generate_parameters(int bits,
unsigned char *seed_in, int seed_len,
int *counter_ret, unsigned long *h_ret,
@@ -294,6 +294,6 @@ err:
if (mont != NULL) BN_MONT_CTX_free(mont);
return(ok?ret:NULL);
}
#endif /* ndef FIPS */
#endif /* ndef OPENSSL_FIPS */
#endif /* ndef OPENSSL_NO_SHA */

View File

@@ -65,7 +65,7 @@
#include <openssl/rand.h>
#include <openssl/asn1.h>
#ifndef FIPS
#ifndef OPENSSL_FIPS
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,

View File

@@ -71,7 +71,7 @@
DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
#ifdef FIPS
#ifdef OPENSSL_FIPS
if(FIPS_mode && !FIPS_dsa_check(dsa))
return NULL;
#endif
@@ -95,7 +95,7 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
{
#ifdef FIPS
#ifdef OPENSSL_FIPS
if(FIPS_mode && !FIPS_dsa_check(dsa))
return 0;
#endif

View File

@@ -73,7 +73,7 @@
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
DSA *dsa)
{
#ifdef FIPS
#ifdef OPENSSL_FIPS
if(FIPS_mode && !FIPS_dsa_check(dsa))
return -1;
#endif

View File

@@ -131,7 +131,7 @@ void ERR_load_crypto_strings(void)
ERR_load_OCSP_strings();
ERR_load_UI_strings();
#endif
#ifdef FIPS
#ifdef OPENSSL_FIPS
ERR_load_FIPS_strings();
#endif
}

View File

@@ -559,7 +559,7 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c)
static const unsigned char end[4]={0x80,0x00,0x00,0x00};
const unsigned char *cp=end;
#ifdef FIPS
#ifdef OPENSSL_FIPS
if(FIPS_mode && !FIPS_md5_allowed)
{
FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD);

View File

@@ -333,7 +333,7 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
#endif
int do_stir_pool = 0;
#ifdef FIPS
#ifdef OPENSSL_FIPS
if(FIPS_mode)
{
FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD);

View File

@@ -87,7 +87,7 @@ int RAND_set_rand_method(const RAND_METHOD *meth)
const RAND_METHOD *RAND_get_rand_method(void)
{
#ifdef FIPS
#ifdef OPENSSL_FIPS
if(FIPS_mode && default_RAND_meth != FIPS_rand_check)
{
RANDerr(RAND_F_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD);

View File

@@ -63,18 +63,18 @@
#include <openssl/opensslv.h>
#ifndef FIPS
#ifndef OPENSSL_FIPS
const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
/* The implementation is in ../md32_common.h */
#include "sha_locl.h"
#else /* ndef FIPS */
#else /* ndef OPENSSL_FIPS */
static void *dummy=&dummy;
#endif /* ndef FIPS */
#endif /* ndef OPENSSL_FIPS */
#endif