summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/md4/md4_one.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-04-10 16:55:17 +0800
committerPeter Jones <pjones@redhat.com>2017-04-11 10:42:19 -0400
commit80d49f758ead0180bfe6161931838e0578248303 (patch)
tree35e120eda72247f93d588b6ec27d6a92602e7ae7 /Cryptlib/OpenSSL/crypto/md4/md4_one.c
parent9bc647e2b23bcfd69a0077c0717fbc454c919a57 (diff)
downloadefi-boot-shim-80d49f758ead0180bfe6161931838e0578248303.tar.gz
efi-boot-shim-80d49f758ead0180bfe6161931838e0578248303.zip
Cryptlib: Remove MD4
MD4 is known to be insecure and shim never uses it. Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/md4/md4_one.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/md4/md4_one.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/Cryptlib/OpenSSL/crypto/md4/md4_one.c b/Cryptlib/OpenSSL/crypto/md4/md4_one.c
deleted file mode 100644
index 9f0989fa..00000000
--- a/Cryptlib/OpenSSL/crypto/md4/md4_one.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
- *
- * Licensed under the OpenSSL license (the "License"). You may not use
- * this file except in compliance with the License. You can obtain a copy
- * in the file LICENSE in the source distribution or at
- * https://www.openssl.org/source/license.html
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <openssl/md4.h>
-#include <openssl/crypto.h>
-
-#ifdef CHARSET_EBCDIC
-# include <openssl/ebcdic.h>
-#endif
-
-unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md)
-{
- MD4_CTX c;
- static unsigned char m[MD4_DIGEST_LENGTH];
-
- if (md == NULL)
- md = m;
- if (!MD4_Init(&c))
- return NULL;
-#ifndef CHARSET_EBCDIC
- MD4_Update(&c, d, n);
-#else
- {
- char temp[1024];
- unsigned long chunk;
-
- while (n > 0) {
- chunk = (n > sizeof(temp)) ? sizeof(temp) : n;
- ebcdic2ascii(temp, d, chunk);
- MD4_Update(&c, temp, chunk);
- n -= chunk;
- d += chunk;
- }
- }
-#endif
- MD4_Final(md, &c);
- OPENSSL_cleanse(&c, sizeof(c)); /* security consideration */
- return (md);
-}