61 DBG (
"CHAP %p initialising with %s digest\n", chap, digest->
name );
66 DBG (
"CHAP %p could not allocate %zd bytes for state\n",
110 DBG (
"CHAP %p responding to challenge\n", chap );
126 DBG (
"CHAP %p finished\n", chap );
129 memset ( chap, 0,
sizeof ( *chap ) );
#define NULL
NULL pointer (VOID *)
#define assert(condition)
Assert a condition at run-time.
void chap_respond(struct chap_response *chap)
Respond to the CHAP challenge.
void chap_update(struct chap_response *chap, const void *data, size_t len)
Add data to the CHAP challenge.
void chap_finish(struct chap_response *chap)
Free resources used by a CHAP response.
int chap_init(struct chap_response *chap, struct digest_algorithm *digest)
Initialise CHAP challenge/response.
uint8_t data[48]
Additional event data.
#define DBG(...)
Print a debugging message.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOMEM
Not enough space.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
static void digest_init(struct digest_algorithm *digest, void *ctx)
static void digest_final(struct digest_algorithm *digest, void *ctx, void *out)
static void digest_update(struct digest_algorithm *digest, void *ctx, const void *data, size_t len)
void * memset(void *dest, int character, size_t len) __nonnull
void * malloc(size_t size)
Allocate memory.
static void(* free)(struct refcnt *refcnt))
uint8_t * digest_context
Context used by the digest algorithm.
uint8_t * response
CHAP response.
struct digest_algorithm * digest
Digest algorithm used for the response.
size_t response_len
Length of CHAP response.
A message digest algorithm.
size_t digestsize
Digest size.
size_t ctxsize
Context size.
const char * name
Algorithm name.