Mercurial > dovecot > core-2.2
annotate src/lib-ntlm/ntlm-encrypt.h @ 14682:d0d7b810646b
Make sure we check all the functions' return values. Minor API changes to simplify this.
Checked using a patched clang that adds attribute(warn_unused_result) to all
functions. This commit fixes several error handling mistakes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 25 Jun 2012 01:14:03 +0300 |
parents | c93ca5e46a8a |
children |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
2692
diff
changeset
|
1 #ifndef NTLM_ENCRYPT_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
2692
diff
changeset
|
2 #define NTLM_ENCRYPT_H |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 |
14682
d0d7b810646b
Make sure we check all the functions' return values. Minor API changes to simplify this.
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
4 void lm_hash(const char *passwd, unsigned char hash[LM_HASH_SIZE]); |
d0d7b810646b
Make sure we check all the functions' return values. Minor API changes to simplify this.
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
5 void ntlm_v1_hash(const char *passwd, unsigned char hash[NTLMSSP_HASH_SIZE]); |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
6 |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 void ntlmssp_v1_response(const unsigned char *hash, |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
8 const unsigned char *challenge, |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
9 unsigned char response[NTLMSSP_RESPONSE_SIZE]); |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
10 |
2692
1065a557516b
NTLM2 authentication support. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2381
diff
changeset
|
11 void ntlmssp2_response( const unsigned char *hash, |
1065a557516b
NTLM2 authentication support. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2381
diff
changeset
|
12 const unsigned char *server_challenge, |
1065a557516b
NTLM2 authentication support. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2381
diff
changeset
|
13 const unsigned char *client_challenge, |
1065a557516b
NTLM2 authentication support. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2381
diff
changeset
|
14 unsigned char response[NTLMSSP_RESPONSE_SIZE]); |
1065a557516b
NTLM2 authentication support. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
2381
diff
changeset
|
15 |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
16 void ntlmssp_v2_response(const char *user, const char *target, |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
17 const unsigned char *hash_v1, |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
18 const unsigned char *challenge, |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
19 const unsigned char *blob, size_t blob_size, |
14629
c93ca5e46a8a
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
Timo Sirainen <tss@iki.fi>
parents:
6410
diff
changeset
|
20 unsigned char response[NTLMSSP_V2_RESPONSE_SIZE]) |
c93ca5e46a8a
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
Timo Sirainen <tss@iki.fi>
parents:
6410
diff
changeset
|
21 ATTR_NULL(2); |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
22 |
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
2692
diff
changeset
|
23 #endif |