48 const void *req,
size_t req_len ) {
50 const struct eap_md5 *md5req = req;
61 if ( req_len <
sizeof ( *md5req ) ) {
62 DBGC (
netdev,
"EAP %s underlength MD5-Challenge:\n",
68 if ( ( req_len -
sizeof ( *md5req ) ) < md5req->
len ) {
69 DBGC (
netdev,
"EAP %s truncated MD5-Challenge:\n",
78 DBGC (
netdev,
"EAP %s could not initialise CHAP: %s\n",
84 &password_setting, &secret );
85 if ( secret_len < 0 ) {
95 md5rsp.len =
sizeof ( md5rsp.value );
100 sizeof ( md5rsp ) ) ) != 0 )
#define EINVAL
Invalid argument.
struct arbelprm_rc_send_wqe rc
uint8_t * response
CHAP response.
int fetch_raw_setting_copy(struct settings *settings, const struct setting *setting, void **data)
Fetch value of setting.
#define EAP_TYPE_MD5
EAP MD5 challenge request/response.
void chap_respond(struct chap_response *chap)
Respond to the CHAP challenge.
EAP MD5 challenge request/response type data.
static int eap_rx_md5(struct eap_supplicant *supplicant, const void *req, size_t req_len)
Handle EAP MD5-Challenge.
struct eap_method eap_md5_method __eap_method
EAP MD5-Challenge method.
uint8_t id
ID for current request/response.
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
int eap_tx_response(struct eap_supplicant *supplicant, const void *rsp, size_t rsp_len)
Transmit EAP response.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
int chap_init(struct chap_response *chap, struct digest_algorithm *digest)
Initialise CHAP challenge/response.
static struct net_device * netdev
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
void chap_finish(struct chap_response *chap)
Free resources used by a CHAP response.
size_t response_len
Length of CHAP response.
static void chap_set_identifier(struct chap_response *chap, unsigned int identifier)
Add identifier data to the CHAP challenge.
char name[NETDEV_NAME_LEN]
Name of this network device.
#define MD5_DIGEST_SIZE
MD5 digest size.
struct net_device * netdev
Network device.
void chap_update(struct chap_response *chap, const void *data, size_t len)
Add data to the CHAP challenge.
Extensible Authentication Protocol.
struct digest_algorithm md5_algorithm
MD5 algorithm.