EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
RADIUS message processing. More...
Go to the source code of this file.
Data Structures | |
struct | radius_hdr |
struct | radius_attr_hdr |
struct | radius_attr_vendor |
struct | radius_ms_mppe_keys |
struct | radius_attr_data |
struct | radius_class_data |
Functions | |
struct radius_hdr * | radius_msg_get_hdr (struct radius_msg *msg) |
struct wpabuf * | radius_msg_get_buf (struct radius_msg *msg) |
struct radius_msg * | radius_msg_new (u8 code, u8 identifier) |
void | radius_msg_free (struct radius_msg *msg) |
void | radius_msg_dump (struct radius_msg *msg) |
int | radius_msg_finish (struct radius_msg *msg, const u8 *secret, size_t secret_len) |
int | radius_msg_finish_srv (struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_authenticator) |
int | radius_msg_finish_das_resp (struct radius_msg *msg, const u8 *secret, size_t secret_len, const struct radius_hdr *req_hdr) |
void | radius_msg_finish_acct (struct radius_msg *msg, const u8 *secret, size_t secret_len) |
void | radius_msg_finish_acct_resp (struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_authenticator) |
int | radius_msg_verify_acct_req (struct radius_msg *msg, const u8 *secret, size_t secret_len) |
int | radius_msg_verify_das_req (struct radius_msg *msg, const u8 *secret, size_t secret_len, int require_message_authenticator) |
struct radius_attr_hdr * | radius_msg_add_attr (struct radius_msg *msg, u8 type, const u8 *data, size_t data_len) |
struct radius_msg * | radius_msg_parse (const u8 *data, size_t len) |
int | radius_msg_add_eap (struct radius_msg *msg, const u8 *data, size_t data_len) |
struct wpabuf * | radius_msg_get_eap (struct radius_msg *msg) |
int | radius_msg_verify (struct radius_msg *msg, const u8 *secret, size_t secret_len, struct radius_msg *sent_msg, int auth) |
int | radius_msg_verify_msg_auth (struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_auth) |
int | radius_msg_copy_attr (struct radius_msg *dst, struct radius_msg *src, u8 type) |
int | radius_msg_make_authenticator (struct radius_msg *msg) |
struct radius_ms_mppe_keys * | radius_msg_get_ms_keys (struct radius_msg *msg, struct radius_msg *sent_msg, const u8 *secret, size_t secret_len) |
struct radius_ms_mppe_keys * | radius_msg_get_cisco_keys (struct radius_msg *msg, struct radius_msg *sent_msg, const u8 *secret, size_t secret_len) |
int | radius_msg_add_mppe_keys (struct radius_msg *msg, const u8 *req_authenticator, const u8 *secret, size_t secret_len, const u8 *send_key, size_t send_key_len, const u8 *recv_key, size_t recv_key_len) |
int | radius_msg_add_wfa (struct radius_msg *msg, u8 subtype, const u8 *data, size_t len) |
int | radius_user_password_hide (struct radius_msg *msg, const u8 *data, size_t data_len, const u8 *secret, size_t secret_len, u8 *buf, size_t buf_len) |
struct radius_attr_hdr * | radius_msg_add_attr_user_password (struct radius_msg *msg, const u8 *data, size_t data_len, const u8 *secret, size_t secret_len) |
int | radius_msg_get_attr (struct radius_msg *msg, u8 type, u8 *buf, size_t len) |
int | radius_msg_get_vlanid (struct radius_msg *msg, int *untagged, int numtagged, int *tagged) |
char * | radius_msg_get_tunnel_password (struct radius_msg *msg, int *keylen, const u8 *secret, size_t secret_len, struct radius_msg *sent_msg, size_t n) |
int | radius_msg_get_attr_ptr (struct radius_msg *msg, u8 type, u8 **buf, size_t *len, const u8 *start) |
int | radius_msg_count_attr (struct radius_msg *msg, u8 type, int min_len) |
void | radius_free_class (struct radius_class_data *c) |
int | radius_copy_class (struct radius_class_data *dst, const struct radius_class_data *src) |
u8 | radius_msg_find_unlisted_attr (struct radius_msg *msg, u8 *attrs) |
int | radius_gen_session_id (u8 *id, size_t len) |
void | encrypt_ms_key (const u8 *key, size_t key_len, u16 salt, const u8 *req_authenticator, const u8 *secret, size_t secret_len, u8 *ebuf, size_t *elen) |
Variables | |
struct radius_hdr | STRUCT_PACKED |
RADIUS message processing.
src/radius/radius.h
#define RADIUS_802_1X_ADDR_FORMAT "%02X-%02X-%02X-%02X-%02X-%02X" |
#define RADIUS_ACCT_AUTHENTIC_LOCAL 2 |
#define RADIUS_ACCT_AUTHENTIC_RADIUS 1 |
#define RADIUS_ACCT_AUTHENTIC_REMOTE 3 |
#define RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_OFF 8 |
#define RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_ON 7 |
#define RADIUS_ACCT_STATUS_TYPE_INTERIM_UPDATE 3 |
#define RADIUS_ACCT_STATUS_TYPE_START 1 |
#define RADIUS_ACCT_STATUS_TYPE_STOP 2 |
#define RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_REBOOT 7 |
#define RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_RESET 6 |
#define RADIUS_ACCT_TERMINATE_CAUSE_CALLBACK 16 |
#define RADIUS_ACCT_TERMINATE_CAUSE_HOST_REQUEST 18 |
#define RADIUS_ACCT_TERMINATE_CAUSE_IDLE_TIMEOUT 4 |
#define RADIUS_ACCT_TERMINATE_CAUSE_LOST_CARRIER 2 |
#define RADIUS_ACCT_TERMINATE_CAUSE_LOST_SERVICE 3 |
#define RADIUS_ACCT_TERMINATE_CAUSE_NAS_ERROR 9 |
#define RADIUS_ACCT_TERMINATE_CAUSE_NAS_REBOOT 11 |
#define RADIUS_ACCT_TERMINATE_CAUSE_NAS_REQUEST 10 |
#define RADIUS_ACCT_TERMINATE_CAUSE_PORT_ERROR 8 |
#define RADIUS_ACCT_TERMINATE_CAUSE_PORT_PREEMPTED 13 |
#define RADIUS_ACCT_TERMINATE_CAUSE_PORT_SUSPENDED 14 |
#define RADIUS_ACCT_TERMINATE_CAUSE_PORT_UNNEEDED 12 |
#define RADIUS_ACCT_TERMINATE_CAUSE_SERVICE_UNAVAILABLE 15 |
#define RADIUS_ACCT_TERMINATE_CAUSE_SESSION_TIMEOUT 5 |
#define RADIUS_ACCT_TERMINATE_CAUSE_USER_ERROR 17 |
#define RADIUS_ACCT_TERMINATE_CAUSE_USER_REQUEST 1 |
#define RADIUS_ADDR_FORMAT "%02x%02x%02x%02x%02x%02x" |
#define RADIUS_CISCO_AV_PAIR 1 |
#define RADIUS_DEFAULT_ATTR_COUNT 16 |
#define RADIUS_DEFAULT_MSG_SIZE 1024 |
#define RADIUS_MAX_ATTR_LEN (255 - sizeof(struct radius_attr_hdr)) |
#define RADIUS_MAX_MSG_LEN 4096 |
#define RADIUS_NAS_PORT_TYPE_IEEE_802_11 19 |
#define RADIUS_SERVICE_TYPE_FRAMED 2 |
#define RADIUS_TERMINATION_ACTION_DEFAULT 0 |
#define RADIUS_TERMINATION_ACTION_RADIUS_REQUEST 1 |
#define RADIUS_TUNNEL_MEDIUM_TYPE_802 6 |
#define RADIUS_TUNNEL_MEDIUM_TYPE_IPV4 1 |
#define RADIUS_TUNNEL_MEDIUM_TYPE_IPV6 2 |
#define RADIUS_TUNNEL_TAGS 32 |
#define RADIUS_TUNNEL_TYPE_GRE 10 |
#define RADIUS_TUNNEL_TYPE_IPIP 7 |
#define RADIUS_TUNNEL_TYPE_L2TP 3 |
#define RADIUS_TUNNEL_TYPE_PPTP 1 |
#define RADIUS_TUNNEL_TYPE_VLAN 13 |
#define RADIUS_VENDOR_ID_CISCO 9 |
#define RADIUS_VENDOR_ID_MICROSOFT 311 |
#define RADIUS_VENDOR_ID_WFA 40808 |
anonymous enum |
anonymous enum |
anonymous enum |
void encrypt_ms_key | ( | const u8 * | key, |
size_t | key_len, | ||
u16 | salt, | ||
const u8 * | req_authenticator, | ||
const u8 * | secret, | ||
size_t | secret_len, | ||
u8 * | ebuf, | ||
size_t * | elen | ||
) |
int radius_copy_class | ( | struct radius_class_data * | dst, |
const struct radius_class_data * | src | ||
) |
void radius_free_class | ( | struct radius_class_data * | c | ) |
int radius_gen_session_id | ( | u8 * | id, |
size_t | len | ||
) |
struct radius_attr_hdr* radius_msg_add_attr | ( | struct radius_msg * | msg, |
u8 | type, | ||
const u8 * | data, | ||
size_t | data_len | ||
) |
struct radius_attr_hdr* radius_msg_add_attr_user_password | ( | struct radius_msg * | msg, |
const u8 * | data, | ||
size_t | data_len, | ||
const u8 * | secret, | ||
size_t | secret_len | ||
) |
int radius_msg_add_eap | ( | struct radius_msg * | msg, |
const u8 * | data, | ||
size_t | data_len | ||
) |
int radius_msg_add_mppe_keys | ( | struct radius_msg * | msg, |
const u8 * | req_authenticator, | ||
const u8 * | secret, | ||
size_t | secret_len, | ||
const u8 * | send_key, | ||
size_t | send_key_len, | ||
const u8 * | recv_key, | ||
size_t | recv_key_len | ||
) |
int radius_msg_add_wfa | ( | struct radius_msg * | msg, |
u8 | subtype, | ||
const u8 * | data, | ||
size_t | len | ||
) |
int radius_msg_copy_attr | ( | struct radius_msg * | dst, |
struct radius_msg * | src, | ||
u8 | type | ||
) |
int radius_msg_count_attr | ( | struct radius_msg * | msg, |
u8 | type, | ||
int | min_len | ||
) |
void radius_msg_dump | ( | struct radius_msg * | msg | ) |
u8 radius_msg_find_unlisted_attr | ( | struct radius_msg * | msg, |
u8 * | attrs | ||
) |
int radius_msg_finish | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len | ||
) |
void radius_msg_finish_acct | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len | ||
) |
void radius_msg_finish_acct_resp | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len, | ||
const u8 * | req_authenticator | ||
) |
int radius_msg_finish_das_resp | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len, | ||
const struct radius_hdr * | req_hdr | ||
) |
int radius_msg_finish_srv | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len, | ||
const u8 * | req_authenticator | ||
) |
void radius_msg_free | ( | struct radius_msg * | msg | ) |
int radius_msg_get_attr | ( | struct radius_msg * | msg, |
u8 | type, | ||
u8 * | buf, | ||
size_t | len | ||
) |
int radius_msg_get_attr_ptr | ( | struct radius_msg * | msg, |
u8 | type, | ||
u8 ** | buf, | ||
size_t * | len, | ||
const u8 * | start | ||
) |
struct wpabuf* radius_msg_get_buf | ( | struct radius_msg * | msg | ) |
struct radius_ms_mppe_keys* radius_msg_get_cisco_keys | ( | struct radius_msg * | msg, |
struct radius_msg * | sent_msg, | ||
const u8 * | secret, | ||
size_t | secret_len | ||
) |
struct wpabuf* radius_msg_get_eap | ( | struct radius_msg * | msg | ) |
struct radius_hdr* radius_msg_get_hdr | ( | struct radius_msg * | msg | ) |
struct radius_ms_mppe_keys* radius_msg_get_ms_keys | ( | struct radius_msg * | msg, |
struct radius_msg * | sent_msg, | ||
const u8 * | secret, | ||
size_t | secret_len | ||
) |
char* radius_msg_get_tunnel_password | ( | struct radius_msg * | msg, |
int * | keylen, | ||
const u8 * | secret, | ||
size_t | secret_len, | ||
struct radius_msg * | sent_msg, | ||
size_t | n | ||
) |
int radius_msg_get_vlanid | ( | struct radius_msg * | msg, |
int * | untagged, | ||
int | numtagged, | ||
int * | tagged | ||
) |
int radius_msg_make_authenticator | ( | struct radius_msg * | msg | ) |
struct radius_msg* radius_msg_new | ( | u8 | code, |
u8 | identifier | ||
) |
struct radius_msg* radius_msg_parse | ( | const u8 * | data, |
size_t | len | ||
) |
int radius_msg_verify | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len, | ||
struct radius_msg * | sent_msg, | ||
int | auth | ||
) |
int radius_msg_verify_acct_req | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len | ||
) |
int radius_msg_verify_das_req | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len, | ||
int | require_message_authenticator | ||
) |
int radius_msg_verify_msg_auth | ( | struct radius_msg * | msg, |
const u8 * | secret, | ||
size_t | secret_len, | ||
const u8 * | req_auth | ||
) |
int radius_user_password_hide | ( | struct radius_msg * | msg, |
const u8 * | data, | ||
size_t | data_len, | ||
const u8 * | secret, | ||
size_t | secret_len, | ||
u8 * | buf, | ||
size_t | buf_len | ||
) |
struct radius_attr_vendor STRUCT_PACKED |