The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
mschap.h
Go to the documentation of this file.
1 #pragma once
2 
3 /* @copyright 2006 The FreeRADIUS server project */
4 
5 RCSIDH(mschap_h, "$Id: c849ed3279763ae9ebdea57b75a711994549f3a6 $")
6 
7 #define NT_DIGEST_LENGTH 16
8 #define LM_DIGEST_LENGTH 16
9 #define MSCHAP_CHALLENGE_LENGTH 8
10 #define MSCHAP_PEER_CHALLENGE_LENGTH 16
11 #define MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH 16
12 
13 int mschap_nt_password_hash(uint8_t out[static NT_DIGEST_LENGTH], char const *password);
14 
15 
17  uint8_t const peer_challenge[static MSCHAP_PEER_CHALLENGE_LENGTH],
18  uint8_t const auth_challenge[static MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH],
19  char const *user_name, size_t user_name_len);
20 
21 void mschap_auth_response(char const *use_rname, size_t user_name_len,
22  uint8_t const *nt_hash_hash,
23  uint8_t const *ntresponse,
24  uint8_t const *peer_challenge, uint8_t const *auth_challenge,
25  char *response);
26 
27 void mschap_add_reply(request_t *request, unsigned char ident,
28  fr_dict_attr_t const *da, char const *value, size_t len);
#define RCSIDH(h, id)
Definition: build.h:445
Test enumeration values.
Definition: dict_test.h:92
unsigned char uint8_t
Definition: merged_model.c:30
void mschap_auth_response(char const *use_rname, size_t user_name_len, uint8_t const *nt_hash_hash, uint8_t const *ntresponse, uint8_t const *peer_challenge, uint8_t const *auth_challenge, char *response)
Definition: mschap.c:101
#define MSCHAP_CHALLENGE_LENGTH
Definition: mschap.h:9
#define MSCHAP_PEER_CHALLENGE_LENGTH
Definition: mschap.h:10
void mschap_add_reply(request_t *request, unsigned char ident, fr_dict_attr_t const *da, char const *value, size_t len)
Definition: mschap.c:162
#define MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH
Definition: mschap.h:11
int mschap_nt_password_hash(uint8_t out[static NT_DIGEST_LENGTH], char const *password)
Converts Unicode password to 16-byte NT hash with MD4.
Definition: mschap.c:52
#define NT_DIGEST_LENGTH
Definition: mschap.h:7
void mschap_challenge_hash(uint8_t challenge[static MSCHAP_CHALLENGE_LENGTH], uint8_t const peer_challenge[static MSCHAP_PEER_CHALLENGE_LENGTH], uint8_t const auth_challenge[static MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH], char const *user_name, size_t user_name_len)
Definition: mschap.c:72
static size_t char ** out
Definition: value.h:984