OpenVAS Libraries  7.0.7
ntlmssp.h
Go to the documentation of this file.
1 /* OpenVAS
2  *
3  * $Id$
4  * Description: Implementation for NTLMSSP support
5  *
6  * Author:
7  * Preeti Subramanian <spreeti@secpod.com>
8  *
9  * Copyright:
10  * Copyright (c) 2010 Greenbone Networks GmbH, http://www.greenbone.net
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2
14  * (or any later version), as published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 /*
27  * Functions to support Authentication(type3 message) for NTLMSSP (NTLMv2, NTLM2, NTLM, KEY GEN)
28  */
29 #ifndef _NTLMSSP_H_
30 #define _NTLMSSP_H_
31 #include "md5.h"
32 #include "proto.h"
33 #include "hmacmd5.h"
34 #include "byteorder.h"
35 #include "smb_crypt.h"
36 
37 #ifndef uchar
38 #define uchar unsigned char
39 #endif
40 
41 #ifndef uint8
42 #define uint8 uint8_t
43 #endif
44 
45 void ntlmssp_genauth_ntlmv2(char* user, char *domain, char* address_list, int address_list_len, char *challenge_data, uint8_t *lm_response,
46  uint8_t *nt_response, uint8_t* session_key, unsigned char* ntlmv2_hash);
47 void ntlmssp_genauth_ntlm2(char *password, uint8_t *lm_response, uint8_t *nt_response, uint8_t *session_key, char *challenge_data, unsigned char* nt_hash);
48 void ntlmssp_genauth_ntlm(char *password, uint8_t *lm_response, uint8_t *nt_response, uint8_t *session_key, char *challenge_data, unsigned char* nt_hash, int neg_flags);
49 uint8_t* ntlmssp_genauth_keyexchg(uint8_t *session_key, char *challenge_data, unsigned char* nt_hash, uint8_t *new_sess_key);
50 
51 #endif