summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/des/set_key.c
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2015-07-28 11:46:38 -0400
committerPeter Jones <pjones@redhat.com>2015-07-28 11:46:38 -0400
commit5ce38c90cf43ee79cd999716ea83a5a44eeb819e (patch)
tree2fb3d9dd667c772fae5f87fa61e1501cf12da0ce /Cryptlib/OpenSSL/crypto/des/set_key.c
parent69ba24ff72921ecabbb47178de40dc5a79350040 (diff)
downloadefi-boot-shim-5ce38c90cf43ee79cd999716ea83a5a44eeb819e.tar.gz
efi-boot-shim-5ce38c90cf43ee79cd999716ea83a5a44eeb819e.zip
Update openssl to 1.0.2d
Also update Cryptlib to edk2 r17731 Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/des/set_key.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/des/set_key.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/Cryptlib/OpenSSL/crypto/des/set_key.c b/Cryptlib/OpenSSL/crypto/des/set_key.c
index fdc8d504..8fd8fe14 100644
--- a/Cryptlib/OpenSSL/crypto/des/set_key.c
+++ b/Cryptlib/OpenSSL/crypto/des/set_key.c
@@ -64,13 +64,13 @@
* 1.1 added norm_expand_bits
* 1.0 First working version
*/
+#include <openssl/crypto.h>
#include "des_locl.h"
-#ifdef OPENSSL_FIPS
-# include <openssl/fips.h>
-#endif
-
-OPENSSL_IMPLEMENT_GLOBAL(int, DES_check_key); /* defaults to false */
+OPENSSL_IMPLEMENT_GLOBAL(int, DES_check_key, 0)
+ /*
+ * defaults to false
+ */
static const unsigned char odd_parity[256] = {
1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14,
16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 26, 26, 28, 28, 31, 31,
@@ -359,8 +359,17 @@ int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule)
}
void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
+#ifdef OPENSSL_FIPS
{
- static int shifts2[16] =
+ fips_cipher_abort(DES);
+ private_DES_set_key_unchecked(key, schedule);
+}
+
+void private_DES_set_key_unchecked(const_DES_cblock *key,
+ DES_key_schedule *schedule)
+#endif
+{
+ static const int shifts2[16] =
{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0 };
register DES_LONG c, d, t, s, t2;
register const unsigned char *in;
@@ -374,10 +383,6 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
k = &schedule->ks->deslong[0];
in = &(*key)[0];
-#ifdef OPENSSL_FIPS
- FIPS_selftest_check();
-#endif
-
c2l(in, c);
c2l(in, d);