OpenVAS Scanner 23.40.3
smb_crypt2.c File Reference

Unix SMB/CIFS implementation. SMB parameters and setup. More...

#include "hmacmd5.h"
#include "smb_crypt.h"
#include <ctype.h>
Include dependency graph for smb_crypt2.c:

Go to the source code of this file.

Functions

static smb_ucs2_t toupper_w (smb_ucs2_t val)
int strupper_w (smb_ucs2_t *s)
void SMBOWFencrypt_ntv2_ntlmssp (const uchar *kr, const uchar *srv_chal_data, int srv_chal_len, const uchar *cli_chal_data, int cli_chal_len, uchar resp_buf[16])

Detailed Description

Unix SMB/CIFS implementation. SMB parameters and setup.

Definition in file smb_crypt2.c.

Function Documentation

◆ SMBOWFencrypt_ntv2_ntlmssp()

void SMBOWFencrypt_ntv2_ntlmssp ( const uchar * kr,
const uchar * srv_chal_data,
int srv_chal_len,
const uchar * cli_chal_data,
int cli_chal_len,
uchar resp_buf[16] )

Definition at line 53 of file smb_crypt2.c.

56{
58
59 hmac_md5_init_limK_to_64 (kr, 16, &ctx);
60 hmac_md5_update (srv_chal_data, srv_chal_len, &ctx);
61 hmac_md5_update (cli_chal_data, cli_chal_len, &ctx);
62 hmac_md5_final (resp_buf, &ctx);
63}
void hmac_md5_final(uchar *digest, HMACMD5Context *ctx)
Finish off hmac_md5 "inner" buffer and generate outer one.
Definition hmacmd5.c:64
void hmac_md5_update(const uchar *text, int text_len, HMACMD5Context *ctx)
Update hmac_md5 "inner" buffer.
Definition hmacmd5.c:55
void hmac_md5_init_limK_to_64(const uchar *key, int key_len, HMACMD5Context *ctx)
The microsoft version of hmac_md5 initialisation.
Definition hmacmd5.c:24

References hmac_md5_final(), hmac_md5_init_limK_to_64(), hmac_md5_update(), and uchar.

Here is the call graph for this function:

◆ strupper_w()

int strupper_w ( smb_ucs2_t * s)

Definition at line 35 of file smb_crypt2.c.

36{
37 int ret = 0;
38 while (*s)
39 {
40 smb_ucs2_t v = toupper_w (*s);
41 if (v != *s)
42 {
43 *s = v;
44 ret = 1;
45 }
46 s++;
47 }
48 return ret;
49}
uint16 smb_ucs2_t
Definition hmacmd5.h:52
static smb_ucs2_t toupper_w(smb_ucs2_t val)
Definition smb_crypt2.c:25

References toupper_w().

Referenced by nasl_ntv2_owf_gen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toupper_w()

smb_ucs2_t toupper_w ( smb_ucs2_t val)
static

Definition at line 25 of file smb_crypt2.c.

26{
27 return UCS2_CHAR (islower (val) ? toupper (val) : val);
28}
#define UCS2_CHAR(c)
Definition hmacmd5.h:61
const char * val
Definition nasl_init.c:441

References UCS2_CHAR, and val.

Referenced by strupper_w().

Here is the caller graph for this function: