diff options
Diffstat (limited to 'src/lib/libcrypto/des/set_key.c')
| -rw-r--r-- | src/lib/libcrypto/des/set_key.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libcrypto/des/set_key.c b/src/lib/libcrypto/des/set_key.c index 8881d46a7a..a43ef3c881 100644 --- a/src/lib/libcrypto/des/set_key.c +++ b/src/lib/libcrypto/des/set_key.c | |||
| @@ -65,8 +65,6 @@ | |||
| 65 | */ | 65 | */ |
| 66 | #include "des_locl.h" | 66 | #include "des_locl.h" |
| 67 | 67 | ||
| 68 | #ifndef OPENSSL_FIPS | ||
| 69 | |||
| 70 | OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ | 68 | OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ |
| 71 | 69 | ||
| 72 | static const unsigned char odd_parity[256]={ | 70 | static const unsigned char odd_parity[256]={ |
| @@ -89,7 +87,7 @@ static const unsigned char odd_parity[256]={ | |||
| 89 | 87 | ||
| 90 | void DES_set_odd_parity(DES_cblock *key) | 88 | void DES_set_odd_parity(DES_cblock *key) |
| 91 | { | 89 | { |
| 92 | int i; | 90 | unsigned int i; |
| 93 | 91 | ||
| 94 | for (i=0; i<DES_KEY_SZ; i++) | 92 | for (i=0; i<DES_KEY_SZ; i++) |
| 95 | (*key)[i]=odd_parity[(*key)[i]]; | 93 | (*key)[i]=odd_parity[(*key)[i]]; |
| @@ -97,7 +95,7 @@ void DES_set_odd_parity(DES_cblock *key) | |||
| 97 | 95 | ||
| 98 | int DES_check_key_parity(const_DES_cblock *key) | 96 | int DES_check_key_parity(const_DES_cblock *key) |
| 99 | { | 97 | { |
| 100 | int i; | 98 | unsigned int i; |
| 101 | 99 | ||
| 102 | for (i=0; i<DES_KEY_SZ; i++) | 100 | for (i=0; i<DES_KEY_SZ; i++) |
| 103 | { | 101 | { |
| @@ -117,7 +115,7 @@ int DES_check_key_parity(const_DES_cblock *key) | |||
| 117 | * (and actual cblock values). | 115 | * (and actual cblock values). |
| 118 | */ | 116 | */ |
| 119 | #define NUM_WEAK_KEY 16 | 117 | #define NUM_WEAK_KEY 16 |
| 120 | static DES_cblock weak_keys[NUM_WEAK_KEY]={ | 118 | static const DES_cblock weak_keys[NUM_WEAK_KEY]={ |
| 121 | /* weak keys */ | 119 | /* weak keys */ |
| 122 | {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}, | 120 | {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}, |
| 123 | {0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, | 121 | {0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, |
| @@ -407,5 +405,3 @@ void des_fixup_key_parity(des_cblock *key) | |||
| 407 | des_set_odd_parity(key); | 405 | des_set_odd_parity(key); |
| 408 | } | 406 | } |
| 409 | */ | 407 | */ |
| 410 | |||
| 411 | #endif /* ndef OPENSSL_FIPS */ | ||
