|
|
b6b438 |
From a2430d2ddcabca282d49e8dcd66cc0aaa1e85918 Mon Sep 17 00:00:00 2001
|
|
|
b6b438 |
From: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Date: Mon, 18 Nov 2019 10:29:55 +0100
|
|
|
b6b438 |
Subject: [PATCH 159/187] libcli:auth: Remove unused E_md5hash()
|
|
|
b6b438 |
|
|
|
b6b438 |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195
|
|
|
b6b438 |
|
|
|
b6b438 |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
|
b6b438 |
(cherry picked from commit e19b115dd27891896364f5e943b0ce7fcc89344e)
|
|
|
b6b438 |
---
|
|
|
b6b438 |
libcli/auth/proto.h | 8 --------
|
|
|
b6b438 |
libcli/auth/smbencrypt.c | 33 ---------------------------------
|
|
|
b6b438 |
2 files changed, 41 deletions(-)
|
|
|
b6b438 |
|
|
|
b6b438 |
diff --git a/libcli/auth/proto.h b/libcli/auth/proto.h
|
|
|
b6b438 |
index eef1c8dc095..eb725c83d15 100644
|
|
|
b6b438 |
--- a/libcli/auth/proto.h
|
|
|
b6b438 |
+++ b/libcli/auth/proto.h
|
|
|
b6b438 |
@@ -105,14 +105,6 @@ bool SMBencrypt(const char *passwd, const uint8_t *c8, uint8_t p24[24]);
|
|
|
b6b438 |
*/
|
|
|
b6b438 |
bool E_md4hash(const char *passwd, uint8_t p16[16]);
|
|
|
b6b438 |
|
|
|
b6b438 |
-/**
|
|
|
b6b438 |
- * Creates the MD5 Hash of a combination of 16 byte salt and 16 byte NT hash.
|
|
|
b6b438 |
- * @param 16 byte salt.
|
|
|
b6b438 |
- * @param 16 byte NT hash.
|
|
|
b6b438 |
- * @param 16 byte return hashed with md5, caller allocated 16 byte buffer
|
|
|
b6b438 |
- */
|
|
|
b6b438 |
-void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16]);
|
|
|
b6b438 |
-
|
|
|
b6b438 |
/**
|
|
|
b6b438 |
* Creates the DES forward-only Hash of the users password in DOS ASCII charset
|
|
|
b6b438 |
* @param passwd password in 'unix' charset.
|
|
|
b6b438 |
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
|
|
|
b6b438 |
index e33d29de19d..ab2c47ad9bb 100644
|
|
|
b6b438 |
--- a/libcli/auth/smbencrypt.c
|
|
|
b6b438 |
+++ b/libcli/auth/smbencrypt.c
|
|
|
b6b438 |
@@ -94,39 +94,6 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
|
|
|
b6b438 |
return true;
|
|
|
b6b438 |
}
|
|
|
b6b438 |
|
|
|
b6b438 |
-/**
|
|
|
b6b438 |
- * Creates the MD5 Hash of a combination of 16 byte salt and 16 byte NT hash.
|
|
|
b6b438 |
- * @param 16 byte salt.
|
|
|
b6b438 |
- * @param 16 byte NT hash.
|
|
|
b6b438 |
- * @param 16 byte return hashed with md5, caller allocated 16 byte buffer
|
|
|
b6b438 |
- */
|
|
|
b6b438 |
-
|
|
|
b6b438 |
-void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
|
|
|
b6b438 |
-{
|
|
|
b6b438 |
- gnutls_hash_hd_t hash_hnd = NULL;
|
|
|
b6b438 |
- int rc;
|
|
|
b6b438 |
-
|
|
|
b6b438 |
- rc = gnutls_hash_init(&hash_hnd, GNUTLS_DIG_MD5);
|
|
|
b6b438 |
- if (rc < 0) {
|
|
|
b6b438 |
- goto out;
|
|
|
b6b438 |
- }
|
|
|
b6b438 |
-
|
|
|
b6b438 |
- rc = gnutls_hash(hash_hnd, salt, 16);
|
|
|
b6b438 |
- if (rc < 0) {
|
|
|
b6b438 |
- gnutls_hash_deinit(hash_hnd, NULL);
|
|
|
b6b438 |
- goto out;
|
|
|
b6b438 |
- }
|
|
|
b6b438 |
- rc = gnutls_hash(hash_hnd, nthash, 16);
|
|
|
b6b438 |
- if (rc < 0) {
|
|
|
b6b438 |
- gnutls_hash_deinit(hash_hnd, NULL);
|
|
|
b6b438 |
- goto out;
|
|
|
b6b438 |
- }
|
|
|
b6b438 |
- gnutls_hash_deinit(hash_hnd, hash_out);
|
|
|
b6b438 |
-
|
|
|
b6b438 |
-out:
|
|
|
b6b438 |
- return;
|
|
|
b6b438 |
-}
|
|
|
b6b438 |
-
|
|
|
b6b438 |
/**
|
|
|
b6b438 |
* Creates the DES forward-only Hash of the users password in DOS ASCII charset
|
|
|
b6b438 |
* @param passwd password in 'unix' charset.
|
|
|
b6b438 |
--
|
|
|
b6b438 |
2.23.0
|
|
|
b6b438 |
|