summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/set_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/des/set_key.c')
-rw-r--r--src/lib/libcrypto/des/set_key.c10
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
70OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ 68OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */
71 69
72static const unsigned char odd_parity[256]={ 70static const unsigned char odd_parity[256]={
@@ -89,7 +87,7 @@ static const unsigned char odd_parity[256]={
89 87
90void DES_set_odd_parity(DES_cblock *key) 88void 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
98int DES_check_key_parity(const_DES_cblock *key) 96int 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
120static DES_cblock weak_keys[NUM_WEAK_KEY]={ 118static 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 */