Update symbols. Add #ifdef OPENSSL_FIPS in various places.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 2 Jun 2005 00:09:25 +0000 (00:09 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 2 Jun 2005 00:09:25 +0000 (00:09 +0000)
crypto/bn/bn_x931p.c
crypto/rsa/rsa.h
fips/fipshashes.c
fips/rsa/fips_rsa_x931g.c
fips/rsa/fips_rsavtest.c
fips/sha/fips_sha256.c
fips/sha/fips_sha512.c
util/libeay.num

index 6b8543aef4323b449d4b1d7759fe13c622d7562c..c64410dd3aefec58d99ae2268a6b111df5fc4743 100644 (file)
@@ -59,6 +59,8 @@
 #include <stdio.h>
 #include <openssl/bn.h>
 
+#ifdef OPENSSL_FIPS
+
 /* X9.31 routines for prime derivation */
 
 
@@ -277,3 +279,4 @@ int BN_X931_generate_prime(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
 
        }
 
+#endif
index f5b36bf630ad1e2b4625c8feb7456c8201c5e799..f9495863cc56b031c3e1e8fddc232afb31651907 100644 (file)
@@ -204,7 +204,7 @@ int RSA_size(const RSA *);
 RSA *  RSA_generate_key(int bits, unsigned long e,void
                (*callback)(int,int,void *),void *cb_arg);
 int    RSA_check_key(const RSA *);
-#ifndef FIPS
+#ifdef OPENSSL_FIPS
 int RSA_X931_derive(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
                        void (*cb)(int, int, void *), void *cb_arg,
                        const BIGNUM *Xp1, const BIGNUM *Xp2, const BIGNUM *Xp,
index 040ab284009c76bce99834ce593186cda2e3443e..59aca13d5f7358040d718d0748e5fd29317e9a72 100644 (file)
@@ -24,7 +24,7 @@ const char * const FIPS_source_hashes[] = {
 "HMAC-SHA1(rsa/fips_rsa_eay.c)= 2512f849a220daa083f346b10effdb2ee96d4395",
 "HMAC-SHA1(rsa/fips_rsa_gen.c)= 577466931c054d99caf4ac2aefff0e35efd94024",
 "HMAC-SHA1(rsa/fips_rsa_selftest.c)= a9dc47bd1001f795d1565111d26433c300101e06",
-"HMAC-SHA1(rsa/fips_rsa_x931g.c)= 62ecb2622cf61010561d5800ba2c74f54a3d2526",
+"HMAC-SHA1(rsa/fips_rsa_x931g.c)= 1827d381bb21c53a38a7194cb1c428a2b5f1e3ab",
 "HMAC-SHA1(sha/fips_sha1dgst.c)= 26e529d630b5e754b4a29bd1bb697e991e7fdc04",
 "HMAC-SHA1(sha/fips_standalone_sha1.c)= faae95bc36cc80f5be6a0cde02ebab0f63d4fd97",
 "HMAC-SHA1(sha/fips_sha1_selftest.c)= a08f9c1e2c0f63b9aa96b927c0333a03b020749f",
@@ -32,8 +32,8 @@ const char * const FIPS_source_hashes[] = {
 "HMAC-SHA1(sha/fips_sha_locl.h)= 30b6d6bdbdc9db0d66dc89010c1f4fe1c7b60574",
 "HMAC-SHA1(sha/fips_md32_common.h)= c34d8b7785d3194ff968cf6d3efdd2bfcaec1fad",
 "HMAC-SHA1(sha/fips_sha.h)= cbe98c211cff1684adfa3fe6e6225e92a0a25f6c",
-"HMAC-SHA1(sha/fips_sha256.c)= 826e768677e67b7c87dfc9e084245b619804d01c",
-"HMAC-SHA1(sha/fips_sha512.c)= 27e16912ff196982425c00fe266fa84ef4f48fcd",
+"HMAC-SHA1(sha/fips_sha256.c)= 97e6dee22a1fe993cc48aa8ff37af10701d7f599",
+"HMAC-SHA1(sha/fips_sha512.c)= 74e6ef26de96f774d233888b831289e69834dd79",
 "HMAC-SHA1(hmac/fips_hmac.c)= a477cec1da76c0092979c4a875b6469339bff7ef",
 "HMAC-SHA1(hmac/fips_hmac_selftest.c)= ebb32b205babf4300017de767fd6e3f1879765c9",
 };
index cb899373047de5111904c9d8ea405d9ce4d71b01..41e1473bca7cc9b9c99d570ddb40721711cdf99c 100644 (file)
@@ -64,6 +64,8 @@
 #include <openssl/rsa.h>
 #include <openssl/fips.h>
 
+#ifdef OPENSSL_FIPS
+
 extern int fips_check_rsa(RSA *rsa);
 
 
@@ -284,3 +286,4 @@ RSA *RSA_X931_generate_key(FIPS_RSA_SIZE_T bits, const BIGNUM *e,
 
        }
 
+#endif
index 1a3a1db5d17190ddf78e6f449ac20dabb0d83c6b..0762a9c7a0d8bc4a46a502fb5dbc81fce42509f1 100644 (file)
@@ -403,6 +403,7 @@ static int rsa_printver(BIO *err, BIO *out,
 
        if (r < 0)
                goto error;
+ERR_print_errors(err);
        ERR_clear_error();
 
        if (r == 0)
index 203e5594fc70f9256ef1cabc8e4039a6451d7058..b5a1ca0cac2bbb5a84a329a39238700507bcccfd 100644 (file)
@@ -15,6 +15,8 @@
 #include <openssl/fips.h>
 #include <openssl/opensslv.h>
 
+#ifdef OPENSSL_FIPS
+
 const char SHA256_version[]="SHA-256" OPENSSL_VERSION_PTEXT;
 
 int SHA224_Init (SHA256_CTX *c)
@@ -317,4 +319,7 @@ void HASH_BLOCK_HOST_ORDER (SHA256_CTX *ctx, const void *in, size_t num)
 void HASH_BLOCK_DATA_ORDER (SHA256_CTX *ctx, const void *in, size_t num)
 {   sha256_block (ctx,in,num,0);   }
 
+#endif
+
 #endif /* OPENSSL_NO_SHA256 */
+
index 7ac75891c3b3a06199b7ce22f94c0a40cf729c5c..9e906af315b59f1ea5494267bc2873ed93ca03b6 100644 (file)
@@ -49,6 +49,8 @@
 #include <openssl/fips.h>
 #include <openssl/opensslv.h>
 
+#ifdef OPENSSL_FIPS
+
 const char SHA512_version[]="SHA-512" OPENSSL_VERSION_PTEXT;
 
 #if defined(_M_IX86) || defined(_M_AMD64) || defined(__i386) || defined(__x86_64)
@@ -479,4 +481,7 @@ static void sha512_block (SHA512_CTX *ctx, const void *in, size_t num)
 
 #endif /* SHA512_ASM */
 
+#endif
+
 #endif /* OPENSSL_NO_SHA512 */
+
index 0bbdbe5117f9515c54dcb78d0ddf11b1bcda5db2..c4457777524413628395988b615b9e549b668495 100755 (executable)
@@ -2882,3 +2882,8 @@ RSA_verify_PKCS1_PSS                    3321      EXIST::FUNCTION:RSA
 RSA_padding_add_X931                    3322   EXIST::FUNCTION:RSA
 RSA_padding_add_PKCS1_PSS               3323   EXIST::FUNCTION:RSA
 PKCS1_MGF1                              3324   EXIST::FUNCTION:RSA
+BN_X931_generate_Xpq                    3325   EXIST:OPENSSL_FIPS:FUNCTION:
+RSA_X931_generate_key                   3326   EXIST:OPENSSL_FIPS:FUNCTION:RSA
+BN_X931_derive_prime                    3327   EXIST:OPENSSL_FIPS:FUNCTION:
+BN_X931_generate_prime                  3328   EXIST:OPENSSL_FIPS:FUNCTION:
+RSA_X931_derive                         3329   EXIST:OPENSSL_FIPS:FUNCTION:RSA