summaryrefslogtreecommitdiff
path: root/PasswordCrypt.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-04-10 17:23:29 +0800
committerPeter Jones <pjones@redhat.com>2017-04-11 10:42:19 -0400
commite9cc33d6f2b7f35c6f5e349fd83fb9ae0bc66226 (patch)
treea0b5f5e2b4444bb15f5a4c145a4107c9158dda83 /PasswordCrypt.c
parent80d49f758ead0180bfe6161931838e0578248303 (diff)
downloadefi-boot-shim-e9cc33d6f2b7f35c6f5e349fd83fb9ae0bc66226.tar.gz
efi-boot-shim-e9cc33d6f2b7f35c6f5e349fd83fb9ae0bc66226.zip
Cryptlib: remove DES
Disable DES completely since it's already old and insecure. This makes MokManager not support the DES based password hash but probably no one is using it. Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'PasswordCrypt.c')
-rw-r--r--PasswordCrypt.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/PasswordCrypt.c b/PasswordCrypt.c
index e0a82cfd..2494549c 100644
--- a/PasswordCrypt.c
+++ b/PasswordCrypt.c
@@ -3,7 +3,6 @@
#include <Library/BaseCryptLib.h>
#include <openssl/sha.h>
#include <openssl/md5.h>
-#include <openssl/des.h>
#include "PasswordCrypt.h"
#include "crypt_blowfish.h"
@@ -31,20 +30,6 @@ UINT16 get_hash_size (const UINT16 method)
return 0;
}
-static EFI_STATUS trad_des_crypt (const char *key, const char *salt, UINT8 *hash)
-{
- char result[TRAD_DES_HASH_SIZE + 1];
- char *ret;
-
- ret = DES_fcrypt(key, salt, result);
- if (ret) {
- CopyMem(hash, result, TRAD_DES_HASH_SIZE);
- return EFI_SUCCESS;
- }
-
- return EFI_UNSUPPORTED;
-}
-
static const char md5_salt_prefix[] = "$1$";
static EFI_STATUS md5_crypt (const char *key, UINT32 key_len,
@@ -308,8 +293,6 @@ EFI_STATUS password_crypt (const char *password, UINT32 pw_length,
switch (pw_crypt->method) {
case TRADITIONAL_DES:
- status = trad_des_crypt (password, (char *)pw_crypt->salt, hash);
- break;
case EXTEND_BSDI_DES:
status = EFI_UNSUPPORTED;
break;