diff options
Diffstat (limited to 'src/lib/libcrypto/rc4/rc4_skey.c')
-rw-r--r-- | src/lib/libcrypto/rc4/rc4_skey.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/lib/libcrypto/rc4/rc4_skey.c b/src/lib/libcrypto/rc4/rc4_skey.c index 4478d1a4b3..b22c40b0bd 100644 --- a/src/lib/libcrypto/rc4/rc4_skey.c +++ b/src/lib/libcrypto/rc4/rc4_skey.c | |||
@@ -59,11 +59,6 @@ | |||
59 | #include <openssl/rc4.h> | 59 | #include <openssl/rc4.h> |
60 | #include "rc4_locl.h" | 60 | #include "rc4_locl.h" |
61 | #include <openssl/opensslv.h> | 61 | #include <openssl/opensslv.h> |
62 | #include <openssl/crypto.h> | ||
63 | #ifdef OPENSSL_FIPS | ||
64 | #include <openssl/fips.h> | ||
65 | #endif | ||
66 | |||
67 | 62 | ||
68 | const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT; | 63 | const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT; |
69 | 64 | ||
@@ -90,11 +85,7 @@ const char *RC4_options(void) | |||
90 | * Date: Wed, 14 Sep 1994 06:35:31 GMT | 85 | * Date: Wed, 14 Sep 1994 06:35:31 GMT |
91 | */ | 86 | */ |
92 | 87 | ||
93 | #ifdef OPENSSL_FIPS | ||
94 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | ||
95 | #else | ||
96 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | 88 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) |
97 | #endif | ||
98 | { | 89 | { |
99 | register RC4_INT tmp; | 90 | register RC4_INT tmp; |
100 | register int id1,id2; | 91 | register int id1,id2; |
@@ -128,20 +119,14 @@ void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | |||
128 | * implementations suffer from significant performance | 119 | * implementations suffer from significant performance |
129 | * losses then, e.g. PIII exhibits >2x deterioration, | 120 | * losses then, e.g. PIII exhibits >2x deterioration, |
130 | * and so does Opteron. In order to assure optimal | 121 | * and so does Opteron. In order to assure optimal |
131 | * all-round performance, we detect P4 at run-time by | 122 | * all-round performance, let us [try to] detect P4 at |
132 | * checking upon reserved bit 20 in CPU capability | 123 | * run-time by checking upon HTT bit in CPU capability |
133 | * vector and set up compressed key schedule, which is | 124 | * vector and set up compressed key schedule, which is |
134 | * recognized by correspondingly updated assembler | 125 | * recognized by correspondingly updated assembler |
135 | * module... Bit 20 is set up by OPENSSL_ia32_cpuid. | 126 | * module... |
136 | * | ||
137 | * <appro@fy.chalmers.se> | 127 | * <appro@fy.chalmers.se> |
138 | */ | 128 | */ |
139 | #ifdef OPENSSL_FIPS | ||
140 | unsigned long *ia32cap_ptr = OPENSSL_ia32cap_loc(); | ||
141 | if (ia32cap_ptr && (*ia32cap_ptr & (1<<28))) { | ||
142 | #else | ||
143 | if (OPENSSL_ia32cap_P & (1<<28)) { | 129 | if (OPENSSL_ia32cap_P & (1<<28)) { |
144 | #endif | ||
145 | unsigned char *cp=(unsigned char *)d; | 130 | unsigned char *cp=(unsigned char *)d; |
146 | 131 | ||
147 | for (i=0;i<256;i++) cp[i]=i; | 132 | for (i=0;i<256;i++) cp[i]=i; |