Don't limit uploads.
[fedora-mingw.git] / openssl / openssl-0.9.8j-evp-nonfips.patch
1 diff -up openssl-0.9.8j/crypto/evp/c_alld.c.evp-nonfips openssl-0.9.8j/crypto/evp/c_alld.c
2 --- openssl-0.9.8j/crypto/evp/c_alld.c.evp-nonfips      2005-04-30 23:51:40.000000000 +0200
3 +++ openssl-0.9.8j/crypto/evp/c_alld.c  2009-01-14 17:51:41.000000000 +0100
4 @@ -64,6 +64,11 @@
5  
6  void OpenSSL_add_all_digests(void)
7         {
8 +#ifdef OPENSSL_FIPS
9 +       OPENSSL_init();
10 +       if (!FIPS_mode())
11 +               {
12 +#endif
13  #ifndef OPENSSL_NO_MD2
14         EVP_add_digest(EVP_md2());
15  #endif
16 @@ -111,4 +116,32 @@ void OpenSSL_add_all_digests(void)
17         EVP_add_digest(EVP_sha384());
18         EVP_add_digest(EVP_sha512());
19  #endif
20 +#ifdef OPENSSL_FIPS
21 +               }
22 +       else
23 +               {
24 +#ifndef OPENSSL_NO_SHA
25 +       EVP_add_digest(EVP_sha1());
26 +       EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
27 +       EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
28 +#ifndef OPENSSL_NO_DSA
29 +       EVP_add_digest(EVP_dss1());
30 +       EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2);
31 +       EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1");
32 +       EVP_add_digest_alias(SN_dsaWithSHA1,"dss1");
33 +#endif
34 +#ifndef OPENSSL_NO_ECDSA
35 +       EVP_add_digest(EVP_ecdsa());
36 +#endif
37 +#endif
38 +#ifndef OPENSSL_NO_SHA256
39 +       EVP_add_digest(EVP_sha224());
40 +       EVP_add_digest(EVP_sha256());
41 +#endif
42 +#ifndef OPENSSL_NO_SHA512
43 +       EVP_add_digest(EVP_sha384());
44 +       EVP_add_digest(EVP_sha512());
45 +#endif
46 +               }
47 +#endif
48         }
49 diff -up openssl-0.9.8j/crypto/evp/c_allc.c.evp-nonfips openssl-0.9.8j/crypto/evp/c_allc.c
50 --- openssl-0.9.8j/crypto/evp/c_allc.c.evp-nonfips      2007-04-24 01:50:04.000000000 +0200
51 +++ openssl-0.9.8j/crypto/evp/c_allc.c  2009-01-14 17:51:41.000000000 +0100
52 @@ -65,6 +65,11 @@
53  void OpenSSL_add_all_ciphers(void)
54         {
55  
56 +#ifdef OPENSSL_FIPS
57 +       OPENSSL_init();
58 +       if(!FIPS_mode()) 
59 +               {
60 +#endif
61  #ifndef OPENSSL_NO_DES
62         EVP_add_cipher(EVP_des_cfb());
63         EVP_add_cipher(EVP_des_cfb1());
64 @@ -219,6 +224,63 @@ void OpenSSL_add_all_ciphers(void)
65         EVP_add_cipher_alias(SN_camellia_256_cbc,"CAMELLIA256");
66         EVP_add_cipher_alias(SN_camellia_256_cbc,"camellia256");
67  #endif
68 +#ifdef OPENSSL_FIPS
69 +               }
70 +       else
71 +               {
72 +#ifndef OPENSSL_NO_DES
73 +       EVP_add_cipher(EVP_des_ede_cfb());
74 +       EVP_add_cipher(EVP_des_ede3_cfb());
75 +
76 +       EVP_add_cipher(EVP_des_ede_ofb());
77 +       EVP_add_cipher(EVP_des_ede3_ofb());
78 +
79 +       EVP_add_cipher(EVP_des_ede_cbc());
80 +       EVP_add_cipher(EVP_des_ede3_cbc());
81 +       EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3");
82 +       EVP_add_cipher_alias(SN_des_ede3_cbc,"des3");
83 +
84 +       EVP_add_cipher(EVP_des_ede());
85 +       EVP_add_cipher(EVP_des_ede3());
86 +#endif
87 +
88 +#ifndef OPENSSL_NO_AES
89 +       EVP_add_cipher(EVP_aes_128_ecb());
90 +       EVP_add_cipher(EVP_aes_128_cbc());
91 +       EVP_add_cipher(EVP_aes_128_cfb());
92 +       EVP_add_cipher(EVP_aes_128_cfb1());
93 +       EVP_add_cipher(EVP_aes_128_cfb8());
94 +       EVP_add_cipher(EVP_aes_128_ofb());
95 +#if 0
96 +       EVP_add_cipher(EVP_aes_128_ctr());
97 +#endif
98 +       EVP_add_cipher_alias(SN_aes_128_cbc,"AES128");
99 +       EVP_add_cipher_alias(SN_aes_128_cbc,"aes128");
100 +       EVP_add_cipher(EVP_aes_192_ecb());
101 +       EVP_add_cipher(EVP_aes_192_cbc());
102 +       EVP_add_cipher(EVP_aes_192_cfb());
103 +       EVP_add_cipher(EVP_aes_192_cfb1());
104 +       EVP_add_cipher(EVP_aes_192_cfb8());
105 +       EVP_add_cipher(EVP_aes_192_ofb());
106 +#if 0
107 +       EVP_add_cipher(EVP_aes_192_ctr());
108 +#endif
109 +       EVP_add_cipher_alias(SN_aes_192_cbc,"AES192");
110 +       EVP_add_cipher_alias(SN_aes_192_cbc,"aes192");
111 +       EVP_add_cipher(EVP_aes_256_ecb());
112 +       EVP_add_cipher(EVP_aes_256_cbc());
113 +       EVP_add_cipher(EVP_aes_256_cfb());
114 +       EVP_add_cipher(EVP_aes_256_cfb1());
115 +       EVP_add_cipher(EVP_aes_256_cfb8());
116 +       EVP_add_cipher(EVP_aes_256_ofb());
117 +#if 0
118 +       EVP_add_cipher(EVP_aes_256_ctr());
119 +#endif
120 +       EVP_add_cipher_alias(SN_aes_256_cbc,"AES256");
121 +       EVP_add_cipher_alias(SN_aes_256_cbc,"aes256");
122 +#endif
123 +               }
124 +#endif
125  
126         PKCS12_PBE_add();
127         PKCS5_PBE_add();