libcli:auth: Remove unused E_md5hash()
authorAndreas Schneider <asn@samba.org>
Mon, 18 Nov 2019 09:29:55 +0000 (10:29 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Nov 2019 04:48:29 +0000 (04:48 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/auth/proto.h
libcli/auth/smbencrypt.c

index eef1c8dc09520f2b6eef994ce3553d60c2723395..eb725c83d151486cd157e6302c8f3dc8c53f8a5f 100644 (file)
@@ -105,14 +105,6 @@ bool SMBencrypt(const char *passwd, const uint8_t *c8, uint8_t p24[24]);
  */
 bool E_md4hash(const char *passwd, uint8_t p16[16]);
 
-/**
- * Creates the MD5 Hash of a combination of 16 byte salt and 16 byte NT hash.
- * @param 16 byte salt.
- * @param 16 byte NT hash.
- * @param 16 byte return hashed with md5, caller allocated 16 byte buffer
- */
-void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16]);
-
 /**
  * Creates the DES forward-only Hash of the users password in DOS ASCII charset
  * @param passwd password in 'unix' charset.
index e33d29de19d2d3da7db58e03e6aeaff0ac086845..ab2c47ad9bb35fdbade4a3b865561c236c8afdd0 100644 (file)
@@ -94,39 +94,6 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
        return true;
 }
 
-/**
- * Creates the MD5 Hash of a combination of 16 byte salt and 16 byte NT hash.
- * @param 16 byte salt.
- * @param 16 byte NT hash.
- * @param 16 byte return hashed with md5, caller allocated 16 byte buffer
- */
-
-void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
-{
-       gnutls_hash_hd_t hash_hnd = NULL;
-       int rc;
-
-       rc = gnutls_hash_init(&hash_hnd, GNUTLS_DIG_MD5);
-       if (rc < 0) {
-               goto out;
-       }
-
-       rc = gnutls_hash(hash_hnd, salt, 16);
-       if (rc < 0) {
-               gnutls_hash_deinit(hash_hnd, NULL);
-               goto out;
-       }
-       rc = gnutls_hash(hash_hnd, nthash, 16);
-       if (rc < 0) {
-               gnutls_hash_deinit(hash_hnd, NULL);
-               goto out;
-       }
-       gnutls_hash_deinit(hash_hnd, hash_out);
-
-out:
-       return;
-}
-
 /**
  * Creates the DES forward-only Hash of the users password in DOS ASCII charset
  * @param passwd password in 'unix' charset.