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.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/lib/libcrypto/des/set_key.c b/src/lib/libcrypto/des/set_key.c
index c0806d593c..3004cc3ab3 100644
--- a/src/lib/libcrypto/des/set_key.c
+++ b/src/lib/libcrypto/des/set_key.c
@@ -64,12 +64,8 @@
64 * 1.0 First working version 64 * 1.0 First working version
65 */ 65 */
66#include "des_locl.h" 66#include "des_locl.h"
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
70
71 67
72OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ 68OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key,0) /* defaults to false */
73 69
74static const unsigned char odd_parity[256]={ 70static const unsigned char odd_parity[256]={
75 1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14, 71 1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14,
@@ -340,7 +336,7 @@ int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule)
340 336
341void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule) 337void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
342 { 338 {
343 static int shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0}; 339 static const int shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};
344 register DES_LONG c,d,t,s,t2; 340 register DES_LONG c,d,t,s,t2;
345 register const unsigned char *in; 341 register const unsigned char *in;
346 register DES_LONG *k; 342 register DES_LONG *k;
@@ -353,10 +349,6 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
353 k = &schedule->ks->deslong[0]; 349 k = &schedule->ks->deslong[0];
354 in = &(*key)[0]; 350 in = &(*key)[0];
355 351
356#ifdef OPENSSL_FIPS
357 FIPS_selftest_check();
358#endif
359
360 c2l(in,c); 352 c2l(in,c);
361 c2l(in,d); 353 c2l(in,d);
362 354
@@ -413,4 +405,3 @@ void des_fixup_key_parity(des_cblock *key)
413 des_set_odd_parity(key); 405 des_set_odd_parity(key);
414 } 406 }
415*/ 407*/
416