summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/ntlm_check.c6
-rw-r--r--source4/libcli/auth/ntlmssp.h10
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c22
3 files changed, 19 insertions, 19 deletions
diff --git a/source4/libcli/auth/ntlm_check.c b/source4/libcli/auth/ntlm_check.c
index a3b92752aa..cdb092d1b5 100644
--- a/source4/libcli/auth/ntlm_check.c
+++ b/source4/libcli/auth/ntlm_check.c
@@ -178,7 +178,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
DATA_BLOB *user_sess_key,
DATA_BLOB *lm_sess_key)
{
- static const unsigned char zeros[8];
+ static const uint8_t zeros[8];
if (nt_pw == NULL) {
DEBUG(3,("ntlm_password_check: NO NT password stored for user %s.\n",
username));
@@ -232,7 +232,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
DEBUG(4,("ntlm_password_check: checking plaintext passwords for user %s\n",
username));
if (nt_pw && nt_response->length) {
- unsigned char pwhash[16];
+ uint8_t pwhash[16];
mdfour(pwhash, nt_response->data, nt_response->length);
if (memcmp(pwhash, nt_pw, sizeof(pwhash)) == 0) {
return NT_STATUS_OK;
@@ -255,7 +255,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
/* Only the fisrt 14 chars are considered, password need not be null terminated. */
/* we *might* need to upper-case the string here */
- E_P16((const unsigned char *)dospwd, p16);
+ E_P16((const uint8_t *)dospwd, p16);
if (memcmp(p16, lm_pw, sizeof(p16)) == 0) {
return NT_STATUS_OK;
diff --git a/source4/libcli/auth/ntlmssp.h b/source4/libcli/auth/ntlmssp.h
index a5565888f1..968911fef5 100644
--- a/source4/libcli/auth/ntlmssp.h
+++ b/source4/libcli/auth/ntlmssp.h
@@ -171,13 +171,13 @@ typedef struct ntlmssp_state
char recv_sign_key[16];
char recv_seal_key[16];
- unsigned char send_sign_hash[258];
- unsigned char send_seal_hash[258];
- unsigned char recv_sign_hash[258];
- unsigned char recv_seal_hash[258];
+ uint8_t send_sign_hash[258];
+ uint8_t send_seal_hash[258];
+ uint8_t recv_sign_hash[258];
+ uint8_t recv_seal_hash[258];
/* ntlmv1 */
- unsigned char ntlmssp_hash[258];
+ uint8_t ntlmssp_hash[258];
/* it turns out that we don't always get the
response in at the time we want to process it.
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index df7bddcd38..22aa877b63 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -27,16 +27,16 @@
#define SRV_SIGN "session key to server-to-client signing key magic constant"
#define SRV_SEAL "session key to server-to-client sealing key magic constant"
-static void NTLMSSPcalc_ap( unsigned char *hash, unsigned char *data, int len)
+static void NTLMSSPcalc_ap( uint8_t *hash, uint8_t *data, int len)
{
- unsigned char index_i = hash[256];
- unsigned char index_j = hash[257];
+ uint8_t index_i = hash[256];
+ uint8_t index_j = hash[257];
int ind;
for (ind = 0; ind < len; ind++)
{
- unsigned char tc;
- unsigned char t;
+ uint8_t tc;
+ uint8_t t;
index_i++;
index_j += hash[index_i];
@@ -53,19 +53,19 @@ static void NTLMSSPcalc_ap( unsigned char *hash, unsigned char *data, int len)
hash[257] = index_j;
}
-static void calc_hash(unsigned char hash[258], const char *key, size_t key_len)
+static void calc_hash(uint8_t hash[258], const char *key, size_t key_len)
{
- unsigned char j = 0;
+ uint8_t j = 0;
int ind;
for (ind = 0; ind < 256; ind++)
{
- hash[ind] = (unsigned char)ind;
+ hash[ind] = (uint8_t)ind;
}
for (ind = 0; ind < 256; ind++)
{
- unsigned char tc;
+ uint8_t tc;
j += (hash[ind] + key[ind%key_len]);
@@ -97,7 +97,7 @@ static void calc_hash(unsigned char hash[258], const char *key, size_t key_len)
-static void calc_ntlmv2_hash(unsigned char hash[258], unsigned char subkey[16],
+static void calc_ntlmv2_hash(uint8_t hash[258], uint8_t subkey[16],
DATA_BLOB session_key,
const char *constant)
{
@@ -365,7 +365,7 @@ NTSTATUS ntlmssp_unseal_packet(NTLMSSP_STATE *ntlmssp_state,
*/
NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
{
- unsigned char p24[24];
+ uint8_t p24[24];
ZERO_STRUCT(p24);
DEBUG(3, ("NTLMSSP Sign/Seal - Initialising with flags:\n"));