diff options
author | djm <> | 2009-01-09 12:15:52 +0000 |
---|---|---|
committer | djm <> | 2009-01-09 12:15:52 +0000 |
commit | 23f8d96f0f508b8bef2602049feee9c44228d34c (patch) | |
tree | a2a7787bc00e8f6a29153b8c6d9eb5e8f73d6269 /src/lib/libcrypto/rc4 | |
parent | 30562050421d947c3eb3c10edde6e87730b17471 (diff) | |
download | openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.gz openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.bz2 openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/rc4')
-rwxr-xr-x | src/lib/libcrypto/rc4/asm/rc4-x86_64.pl | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4_skey.c | 16 |
3 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl index 92c52f3433..3a54623495 100755 --- a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl | |||
@@ -358,6 +358,8 @@ ___ | |||
358 | 358 | ||
359 | $code =~ s/#([bwd])/$1/gm; | 359 | $code =~ s/#([bwd])/$1/gm; |
360 | 360 | ||
361 | $code =~ s/RC4_set_key/private_RC4_set_key/g if ($ENV{FIPSCANLIB} ne ""); | ||
362 | |||
361 | print $code; | 363 | print $code; |
362 | 364 | ||
363 | close STDOUT; | 365 | close STDOUT; |
diff --git a/src/lib/libcrypto/rc4/rc4.h b/src/lib/libcrypto/rc4/rc4.h index 7aec04fe93..2d8620d33b 100644 --- a/src/lib/libcrypto/rc4/rc4.h +++ b/src/lib/libcrypto/rc4/rc4.h | |||
@@ -76,6 +76,9 @@ typedef struct rc4_key_st | |||
76 | 76 | ||
77 | 77 | ||
78 | const char *RC4_options(void); | 78 | const char *RC4_options(void); |
79 | #ifdef OPENSSL_FIPS | ||
80 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); | ||
81 | #endif | ||
79 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); | 82 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); |
80 | void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, | 83 | void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, |
81 | unsigned char *outdata); | 84 | unsigned char *outdata); |
diff --git a/src/lib/libcrypto/rc4/rc4_skey.c b/src/lib/libcrypto/rc4/rc4_skey.c index 46b77ec321..4478d1a4b3 100644 --- a/src/lib/libcrypto/rc4/rc4_skey.c +++ b/src/lib/libcrypto/rc4/rc4_skey.c | |||
@@ -59,6 +59,11 @@ | |||
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 | |||
62 | 67 | ||
63 | const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT; | 68 | const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT; |
64 | 69 | ||
@@ -85,7 +90,11 @@ const char *RC4_options(void) | |||
85 | * Date: Wed, 14 Sep 1994 06:35:31 GMT | 90 | * Date: Wed, 14 Sep 1994 06:35:31 GMT |
86 | */ | 91 | */ |
87 | 92 | ||
93 | #ifdef OPENSSL_FIPS | ||
94 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | ||
95 | #else | ||
88 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | 96 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) |
97 | #endif | ||
89 | { | 98 | { |
90 | register RC4_INT tmp; | 99 | register RC4_INT tmp; |
91 | register int id1,id2; | 100 | register int id1,id2; |
@@ -127,7 +136,12 @@ void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) | |||
127 | * | 136 | * |
128 | * <appro@fy.chalmers.se> | 137 | * <appro@fy.chalmers.se> |
129 | */ | 138 | */ |
130 | if (OPENSSL_ia32cap_P & (1<<20)) { | 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)) { | ||
144 | #endif | ||
131 | unsigned char *cp=(unsigned char *)d; | 145 | unsigned char *cp=(unsigned char *)d; |
132 | 146 | ||
133 | for (i=0;i<256;i++) cp[i]=i; | 147 | for (i=0;i<256;i++) cp[i]=i; |