Update/hack mkdef.pl to recognize and add SHA2 algorithms when OPENSSL_FIPS
authorDr. Stephen Henson <steve@openssl.org>
Sat, 4 Feb 2006 23:05:40 +0000 (23:05 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 4 Feb 2006 23:05:40 +0000 (23:05 +0000)
is defined.

util/libeay.num
util/mkdef.pl

index c4457777524413628395988b615b9e549b668495..4222bef6d6c52c1ba32296401b0aea349d971257 100755 (executable)
@@ -2887,3 +2887,21 @@ 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
+SHA512_Update                           3356   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA256_Init                             3479   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA224                                  3510   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA384_Update                           3551   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA224_Final                            3560   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA224_Update                           3562   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA512_Final                            3581   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA224_Init                             3631   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA512_Init                             3633   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA256                                  3654   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA256_Transform                        3664   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA512                                  3669   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA512_Transform                        3675   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA256_Final                            3712   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
+SHA384_Init                             3737   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA384_Final                            3740   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA384                                  3745   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
+SHA256_Update                           3765   EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
index ee44f22af101e98d938f602ec9f0f4ac7d60b4ab..6c1e53bb1466316c69be93f45fbb7b0b7656c5fc 100755 (executable)
@@ -267,7 +267,7 @@ $crypto.=" crypto/ocsp/ocsp.h";
 $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h";
 $crypto.=" crypto/krb5/krb5_asn.h";
 $crypto.=" crypto/tmdiff.h";
-$crypto.=" fips-1.0/fips.h fips-1.0/rand/fips_rand.h";
+$crypto.=" fips-1.0/fips.h fips-1.0/rand/fips_rand.h fips-1.0/sha/fips_sha.h";
 
 my $symhacks="crypto/symhacks.h";
 
@@ -864,6 +864,9 @@ sub do_defs
                        $a .= ",RSA" if($s =~ /PEM_Seal(Final|Init|Update)/);
                        $a .= ",RSA" if($s =~ /RSAPrivateKey/);
                        $a .= ",RSA" if($s =~ /SSLv23?_((client|server)_)?method/);
+                       # SHA2 algorithms only defined in FIPS mode for
+                       # OpenSSL 0.9.7
+                       $p .= "OPENSSL_FIPS" if($s =~ /SHA[235]/);
 
                        $platform{$s} =
                            &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p);