OpenVAS Scanner  7.0.1~git
smb_crypt2.c File Reference

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

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

Go to the source code of this file.

Functions

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 66 of file smb_crypt2.c.

69 {
70  HMACMD5Context ctx;
71 
72  hmac_md5_init_limK_to_64 (kr, 16, &ctx);
73  hmac_md5_update (srv_chal_data, srv_chal_len, &ctx);
74  hmac_md5_update (cli_chal_data, cli_chal_len, &ctx);
75  hmac_md5_final (resp_buf, &ctx);
76 }

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

Here is the call graph for this function:

◆ strupper_w()

int strupper_w ( smb_ucs2_t s)

Definition at line 48 of file smb_crypt2.c.

49 {
50  int ret = 0;
51  while (*s)
52  {
53  smb_ucs2_t v = toupper_w (*s);
54  if (v != *s)
55  {
56  *s = v;
57  ret = 1;
58  }
59  s++;
60  }
61  return ret;
62 }

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)

Definition at line 38 of file smb_crypt2.c.

39 {
40  return UCS2_CHAR (islower (val) ? toupper (val) : val);
41 }

References UCS2_CHAR, and val.

Referenced by strupper_w().

Here is the caller graph for this function:
HMACMD5Context
Definition: hmacmd5.h:41
hmac_md5_init_limK_to_64
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:37
hmac_md5_update
void hmac_md5_update(const uchar *text, int text_len, HMACMD5Context *ctx)
Update hmac_md5 "inner" buffer.
Definition: hmacmd5.c:68
smb_ucs2_t
uint16 smb_ucs2_t
Definition: hmacmd5.h:65
UCS2_CHAR
#define UCS2_CHAR(c)
Definition: hmacmd5.h:74
hmac_md5_final
void hmac_md5_final(uchar *digest, HMACMD5Context *ctx)
Finish off hmac_md5 "inner" buffer and generate outer one.
Definition: hmacmd5.c:77
val
const char * val
Definition: nasl_init.c:378
toupper_w
smb_ucs2_t toupper_w(smb_ucs2_t val)
Definition: smb_crypt2.c:38