iPXE
mschapv2.h
Go to the documentation of this file.
1#ifndef _IPXE_MSCHAPV2_H
2#define _IPXE_MSCHAPV2_H
4/** @file
5 *
6 * MS-CHAPv2 authentication
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#include <stdint.h>
14
15/** An MS-CHAPv2 challenge */
17 /** Raw bytes */
18 uint8_t byte[16];
19} __attribute__ (( packed ));
20
21/** An MS-CHAPv2 NT response */
23 /** DES-encrypted blocks */
25} __attribute__ (( packed ));
26
27/** An MS-CHAPv2 challenge response */
29 /** Peer challenge */
31 /** Reserved, must be zero */
33 /** NT response */
35 /** Flags, must be zero */
37} __attribute__ (( packed ));
38
39/** An MS-CHAPv2 authenticator response */
41 /** Authenticator response string
42 *
43 * This is an unterminated 42-byte string of the form
44 * "S=<auth_string>" where <auth_string> is the upper-cased
45 * hexadecimal encoding of the actual authenticator response
46 * value. Joy.
47 */
48 char wtf[42];
49} __attribute__ (( packed ));
50
51extern void mschapv2_response ( const char *username, const char *password,
52 const struct mschapv2_challenge *challenge,
53 const struct mschapv2_challenge *peer,
54 struct mschapv2_response *response );
55extern void mschapv2_auth ( const char *username, const char *password,
56 const struct mschapv2_challenge *challenge,
57 const struct mschapv2_response *response,
58 struct mschapv2_auth *auth );
59
60#endif /* _IPXE_MSCHAPV2_H */
unsigned char uint8_t
Definition stdint.h:10
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define __attribute__(x)
Definition compiler.h:10
static struct dynamic_item username
Definition login_ui.c:36
static struct dynamic_item password
Definition login_ui.c:37
struct mschapv2_challenge peer
Peer challenge.
Definition mschapv2.h:1
void mschapv2_auth(const char *username, const char *password, const struct mschapv2_challenge *challenge, const struct mschapv2_response *response, struct mschapv2_auth *auth)
Calculate MS-CHAPv2 authenticator response.
Definition mschapv2.c:309
void mschapv2_response(const char *username, const char *password, const struct mschapv2_challenge *challenge, const struct mschapv2_challenge *peer, struct mschapv2_response *response)
Calculate MS-CHAPv2 challenge response.
Definition mschapv2.c:270
An MS-CHAPv2 authenticator response.
Definition mschapv2.h:40
char wtf[42]
Authenticator response string.
Definition mschapv2.h:48
An MS-CHAPv2 challenge.
Definition mschapv2.h:16
An MS-CHAPv2 NT response.
Definition mschapv2.h:22
uint8_t block[3][8]
DES-encrypted blocks.
Definition mschapv2.h:24
An MS-CHAPv2 challenge response.
Definition mschapv2.h:28
uint8_t reserved[8]
Reserved, must be zero.
Definition mschapv2.h:32
struct mschapv2_challenge peer
Peer challenge.
Definition mschapv2.h:30
uint8_t flags
Flags, must be zero.
Definition mschapv2.h:36
struct mschapv2_nt_response nt
NT response.
Definition mschapv2.h:34