128 lines
3.5 KiB
Diff
128 lines
3.5 KiB
Diff
diff -up openssl-0.9.8j/crypto/evp/c_alld.c.evp-nonfips openssl-0.9.8j/crypto/evp/c_alld.c
|
|
--- openssl-0.9.8j/crypto/evp/c_alld.c.evp-nonfips 2005-04-30 23:51:40.000000000 +0200
|
|
+++ openssl-0.9.8j/crypto/evp/c_alld.c 2009-01-14 17:51:41.000000000 +0100
|
|
@@ -64,6 +64,11 @@
|
|
|
|
void OpenSSL_add_all_digests(void)
|
|
{
|
|
+#ifdef OPENSSL_FIPS
|
|
+ OPENSSL_init();
|
|
+ if (!FIPS_mode())
|
|
+ {
|
|
+#endif
|
|
#ifndef OPENSSL_NO_MD2
|
|
EVP_add_digest(EVP_md2());
|
|
#endif
|
|
@@ -111,4 +116,32 @@ void OpenSSL_add_all_digests(void)
|
|
EVP_add_digest(EVP_sha384());
|
|
EVP_add_digest(EVP_sha512());
|
|
#endif
|
|
+#ifdef OPENSSL_FIPS
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+#ifndef OPENSSL_NO_SHA
|
|
+ EVP_add_digest(EVP_sha1());
|
|
+ EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
|
|
+ EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
|
|
+#ifndef OPENSSL_NO_DSA
|
|
+ EVP_add_digest(EVP_dss1());
|
|
+ EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2);
|
|
+ EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1");
|
|
+ EVP_add_digest_alias(SN_dsaWithSHA1,"dss1");
|
|
+#endif
|
|
+#ifndef OPENSSL_NO_ECDSA
|
|
+ EVP_add_digest(EVP_ecdsa());
|
|
+#endif
|
|
+#endif
|
|
+#ifndef OPENSSL_NO_SHA256
|
|
+ EVP_add_digest(EVP_sha224());
|
|
+ EVP_add_digest(EVP_sha256());
|
|
+#endif
|
|
+#ifndef OPENSSL_NO_SHA512
|
|
+ EVP_add_digest(EVP_sha384());
|
|
+ EVP_add_digest(EVP_sha512());
|
|
+#endif
|
|
+ }
|
|
+#endif
|
|
}
|
|
diff -up openssl-0.9.8j/crypto/evp/c_allc.c.evp-nonfips openssl-0.9.8j/crypto/evp/c_allc.c
|
|
--- openssl-0.9.8j/crypto/evp/c_allc.c.evp-nonfips 2007-04-24 01:50:04.000000000 +0200
|
|
+++ openssl-0.9.8j/crypto/evp/c_allc.c 2009-01-14 17:51:41.000000000 +0100
|
|
@@ -65,6 +65,11 @@
|
|
void OpenSSL_add_all_ciphers(void)
|
|
{
|
|
|
|
+#ifdef OPENSSL_FIPS
|
|
+ OPENSSL_init();
|
|
+ if(!FIPS_mode())
|
|
+ {
|
|
+#endif
|
|
#ifndef OPENSSL_NO_DES
|
|
EVP_add_cipher(EVP_des_cfb());
|
|
EVP_add_cipher(EVP_des_cfb1());
|
|
@@ -219,6 +224,63 @@ void OpenSSL_add_all_ciphers(void)
|
|
EVP_add_cipher_alias(SN_camellia_256_cbc,"CAMELLIA256");
|
|
EVP_add_cipher_alias(SN_camellia_256_cbc,"camellia256");
|
|
#endif
|
|
+#ifdef OPENSSL_FIPS
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+#ifndef OPENSSL_NO_DES
|
|
+ EVP_add_cipher(EVP_des_ede_cfb());
|
|
+ EVP_add_cipher(EVP_des_ede3_cfb());
|
|
+
|
|
+ EVP_add_cipher(EVP_des_ede_ofb());
|
|
+ EVP_add_cipher(EVP_des_ede3_ofb());
|
|
+
|
|
+ EVP_add_cipher(EVP_des_ede_cbc());
|
|
+ EVP_add_cipher(EVP_des_ede3_cbc());
|
|
+ EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3");
|
|
+ EVP_add_cipher_alias(SN_des_ede3_cbc,"des3");
|
|
+
|
|
+ EVP_add_cipher(EVP_des_ede());
|
|
+ EVP_add_cipher(EVP_des_ede3());
|
|
+#endif
|
|
+
|
|
+#ifndef OPENSSL_NO_AES
|
|
+ EVP_add_cipher(EVP_aes_128_ecb());
|
|
+ EVP_add_cipher(EVP_aes_128_cbc());
|
|
+ EVP_add_cipher(EVP_aes_128_cfb());
|
|
+ EVP_add_cipher(EVP_aes_128_cfb1());
|
|
+ EVP_add_cipher(EVP_aes_128_cfb8());
|
|
+ EVP_add_cipher(EVP_aes_128_ofb());
|
|
+#if 0
|
|
+ EVP_add_cipher(EVP_aes_128_ctr());
|
|
+#endif
|
|
+ EVP_add_cipher_alias(SN_aes_128_cbc,"AES128");
|
|
+ EVP_add_cipher_alias(SN_aes_128_cbc,"aes128");
|
|
+ EVP_add_cipher(EVP_aes_192_ecb());
|
|
+ EVP_add_cipher(EVP_aes_192_cbc());
|
|
+ EVP_add_cipher(EVP_aes_192_cfb());
|
|
+ EVP_add_cipher(EVP_aes_192_cfb1());
|
|
+ EVP_add_cipher(EVP_aes_192_cfb8());
|
|
+ EVP_add_cipher(EVP_aes_192_ofb());
|
|
+#if 0
|
|
+ EVP_add_cipher(EVP_aes_192_ctr());
|
|
+#endif
|
|
+ EVP_add_cipher_alias(SN_aes_192_cbc,"AES192");
|
|
+ EVP_add_cipher_alias(SN_aes_192_cbc,"aes192");
|
|
+ EVP_add_cipher(EVP_aes_256_ecb());
|
|
+ EVP_add_cipher(EVP_aes_256_cbc());
|
|
+ EVP_add_cipher(EVP_aes_256_cfb());
|
|
+ EVP_add_cipher(EVP_aes_256_cfb1());
|
|
+ EVP_add_cipher(EVP_aes_256_cfb8());
|
|
+ EVP_add_cipher(EVP_aes_256_ofb());
|
|
+#if 0
|
|
+ EVP_add_cipher(EVP_aes_256_ctr());
|
|
+#endif
|
|
+ EVP_add_cipher_alias(SN_aes_256_cbc,"AES256");
|
|
+ EVP_add_cipher_alias(SN_aes_256_cbc,"aes256");
|
|
+#endif
|
|
+ }
|
|
+#endif
|
|
|
|
PKCS12_PBE_add();
|
|
PKCS5_PBE_add();
|