FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <netinet/sctp.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_auth.h>
Go to the source code of this file.
__FBSDID | ( | "$FreeBSD$" | ) |
sctp_authinfo_t * sctp_alloc_authinfo | ( | void | ) |
Definition at line 779 of file sctp_auth.c.
References SCTP_MALLOC.
sctp_auth_chklist_t * sctp_alloc_chunklist | ( | void | ) |
Definition at line 62 of file sctp_auth.c.
References sctp_clear_chunklist(), SCTP_DEBUG_AUTH1, SCTP_MALLOC, and SCTPDBG.
Referenced by sctp_auth_get_cookie_params(), sctp_copy_chunklist(), sctp_inpcb_alloc(), and sctp_load_addresses_from_init().
sctp_hmaclist_t * sctp_alloc_hmaclist | ( | uint16_t | num_hmacs | ) |
Definition at line 630 of file sctp_auth.c.
References sctp_hmaclist::hmac, sctp_hmaclist::max_algo, sctp_hmaclist::num_algo, and SCTP_MALLOC.
Referenced by sctp_auth_get_cookie_params(), sctp_copy_hmaclist(), sctp_default_supported_hmaclist(), sctp_load_addresses_from_init(), and sctp_setopt().
sctp_key_t * sctp_alloc_key | ( | uint32_t | keylen | ) |
Definition at line 244 of file sctp_auth.c.
References sctp_key::keylen, and SCTP_MALLOC.
Referenced by sctp_auth_get_cookie_params(), sctp_compute_hashkey(), sctp_generate_random_key(), sctp_initialize_auth_params(), sctp_load_addresses_from_init(), and sctp_set_key().
sctp_sharedkey_t * sctp_alloc_sharedkey | ( | void | ) |
Definition at line 457 of file sctp_auth.c.
References sctp_shared_key::deactivated, sctp_shared_key::key, sctp_shared_key::keyid, sctp_shared_key::refcount, and SCTP_MALLOC.
Referenced by sctp_copy_sharedkey(), sctp_inpcb_alloc(), and sctp_setopt().
int sctp_auth_add_chunk | ( | uint8_t | chunk, |
sctp_auth_chklist_t * | list | ||
) |
Definition at line 105 of file sctp_auth.c.
References sctp_auth_chklist::chunks, sctp_auth_chklist::num_chunks, SCTP_AUTHENTICATION, SCTP_DEBUG_AUTH1, SCTP_INITIATION, SCTP_INITIATION_ACK, SCTP_SHUTDOWN_COMPLETE, and SCTPDBG.
Referenced by sctp_auth_get_cookie_params(), sctp_inpcb_alloc(), sctp_load_addresses_from_init(), sctp_setopt(), and sctp_unpack_auth_chunks().
int sctp_auth_add_hmacid | ( | sctp_hmaclist_t * | list, |
uint16_t | hmac_id | ||
) |
Definition at line 656 of file sctp_auth.c.
References sctp_hmaclist::hmac, sctp_hmaclist::max_algo, sctp_hmaclist::num_algo, SCTP_AUTH_HMAC_ID_SHA1, SCTP_AUTH_HMAC_ID_SHA256, SCTP_DEBUG_AUTH1, and SCTPDBG.
Referenced by sctp_auth_get_cookie_params(), sctp_default_supported_hmaclist(), sctp_load_addresses_from_init(), and sctp_setopt().
int sctp_auth_delete_chunk | ( | uint8_t | chunk, |
sctp_auth_chklist_t * | list | ||
) |
Definition at line 131 of file sctp_auth.c.
References sctp_auth_chklist::chunks, sctp_auth_chklist::num_chunks, SCTP_DEBUG_AUTH1, and SCTPDBG.
Referenced by sctp_setopt().
size_t sctp_auth_get_chklist_size | ( | const sctp_auth_chklist_t * | list | ) |
Definition at line 147 of file sctp_auth.c.
References sctp_auth_chklist::num_chunks.
Referenced by sctp_getopt(), and sctp_send_initiate().
void sctp_auth_get_cookie_params | ( | struct sctp_tcb * | stcb, |
struct mbuf * | m, | ||
uint32_t | offset, | ||
uint32_t | length | ||
) |
Definition at line 1362 of file sctp_auth.c.
References sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_authinformation::assoc_keyid, sctp_association::authinfo, sctp_pcb::default_keyid, sctp_key::key, sctp_association::local_auth_chunks, sctp_association::local_hmacs, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_association::peer_hmac_id, sctp_association::peer_hmacs, sctp_authinformation::random, sctp_authinformation::random_len, sctp_authinformation::recv_keyid, sctp_alloc_chunklist(), sctp_alloc_hmaclist(), sctp_alloc_key(), sctp_auth_add_chunk(), sctp_auth_add_hmacid(), SCTP_CHUNK_LIST, sctp_clear_cachedkeys(), sctp_clear_chunklist(), sctp_copy_skeylist(), sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_free_hmaclist(), sctp_free_key(), sctp_get_next_param(), SCTP_HMAC_LIST, sctp_m_getptr(), sctp_negotiate_hmacid(), SCTP_PARAM_BUFFER_SIZE, SCTP_RANDOM, SCTP_SIZE32, sctp_pcb::shared_keys, and sctp_association::shared_keys.
Referenced by sctp_process_cookie_new().
int sctp_auth_is_supported_hmac | ( | sctp_hmaclist_t * | list, |
uint16_t | id | ||
) |
Definition at line 1124 of file sctp_auth.c.
References sctp_hmaclist::hmac, sctp_hmaclist::num_algo, and SCTP_AUTH_HMAC_ID_RSVD.
Referenced by sctp_handle_auth().
Definition at line 547 of file sctp_auth.c.
References sctp_tcb::asoc, sctp_shared_key::refcount, SCTP_DEBUG_AUTH2, sctp_find_sharedkey(), SCTPDBG, and sctp_association::shared_keys.
Referenced by sctp_copy_it_in(), sctp_move_to_outqueue(), and sctp_msg_append().
Definition at line 564 of file sctp_auth.c.
References sctp_tcb::asoc, sctp_shared_key::deactivated, sctp_shared_key::refcount, SCTP_DEBUG_AUTH2, sctp_find_sharedkey(), sctp_free_sharedkey(), SCTP_NOTIFY_AUTH_FREE_KEY, sctp_ulp_notify(), SCTPDBG, and sctp_association::shared_keys.
Referenced by sctp_clean_up_stream(), sctp_free_assoc(), and sctp_process_cookie_existing().
Definition at line 1252 of file sctp_auth.c.
References sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_association::authinfo, sctp_shared_key::deactivated, sctp_shared_key::refcount, sctp_find_sharedkey(), and sctp_association::shared_keys.
Referenced by sctp_setopt().
int sctp_auth_setactivekey_ep | ( | struct sctp_inpcb * | inp, |
uint16_t | keyid | ||
) |
Definition at line 1280 of file sctp_auth.c.
References sctp_pcb::default_keyid, sctp_inpcb::sctp_ep, sctp_find_sharedkey(), and sctp_pcb::shared_keys.
Referenced by sctp_setopt().
Definition at line 1145 of file sctp_auth.c.
References sctp_tcb::asoc, sctp_authinformation::assoc_key, sctp_authinformation::assoc_keyid, sctp_association::authinfo, sctp_authinformation::recv_key, sctp_authinformation::recv_keyid, and sctp_free_key().
Referenced by sctp_auth_get_cookie_params(), sctp_clear_cachedkeys_ep(), sctp_delete_sharedkey(), sctp_load_addresses_from_init(), and sctp_setopt().
void sctp_clear_cachedkeys_ep | ( | struct sctp_inpcb * | inp, |
uint16_t | keyid | ||
) |
Definition at line 1166 of file sctp_auth.c.
References sctp_inpcb::sctp_asoc_list, sctp_clear_cachedkeys(), SCTP_TCB_LOCK, and SCTP_TCB_UNLOCK.
Referenced by sctp_delete_sharedkey_ep(), and sctp_setopt().
void sctp_clear_chunklist | ( | sctp_auth_chklist_t * | chklist | ) |
Definition at line 55 of file sctp_auth.c.
Referenced by sctp_alloc_chunklist(), sctp_auth_get_cookie_params(), and sctp_load_addresses_from_init().
|
static |
Definition at line 351 of file sctp_auth.c.
References sctp_key::key, and sctp_get_keylen().
Referenced by sctp_compute_hashkey().
sctp_key_t * sctp_compute_hashkey | ( | sctp_key_t * | key1, |
sctp_key_t * | key2, | ||
sctp_key_t * | shared | ||
) |
Definition at line 402 of file sctp_auth.c.
References sctp_key::key, sctp_key::keylen, sctp_alloc_key(), sctp_compare_key(), and sctp_get_keylen().
Referenced by sctp_fill_hmac_digest_m(), and sctp_handle_auth().
uint32_t sctp_compute_hmac | ( | uint16_t | hmac_algo, |
sctp_key_t * | key, | ||
uint8_t * | text, | ||
uint32_t | textlen, | ||
uint8_t * | digest | ||
) |
Definition at line 1057 of file sctp_auth.c.
References sctp_key::key, sctp_key::keylen, SCTP_AUTH_DIGEST_LEN_MAX, sctp_get_hmac_block_len(), sctp_get_hmac_digest_len(), sctp_hmac(), sctp_hmac_final(), sctp_hmac_init(), and sctp_hmac_update().
uint32_t sctp_compute_hmac_m | ( | uint16_t | hmac_algo, |
sctp_key_t * | key, | ||
struct mbuf * | m, | ||
uint32_t | m_offset, | ||
uint8_t * | digest | ||
) |
Definition at line 1092 of file sctp_auth.c.
References sctp_key::key, sctp_key::keylen, SCTP_AUTH_DIGEST_LEN_MAX, sctp_get_hmac_block_len(), sctp_get_hmac_digest_len(), sctp_hmac_final(), sctp_hmac_init(), sctp_hmac_m(), and sctp_hmac_update().
Referenced by sctp_fill_hmac_digest_m(), and sctp_handle_auth().
sctp_auth_chklist_t * sctp_copy_chunklist | ( | sctp_auth_chklist_t * | list | ) |
Definition at line 84 of file sctp_auth.c.
References sctp_alloc_chunklist().
Referenced by sctp_do_peeloff(), sctp_handle_cookie_echo(), and sctp_initialize_auth_params().
sctp_hmaclist_t * sctp_copy_hmaclist | ( | sctp_hmaclist_t * | list | ) |
Definition at line 684 of file sctp_auth.c.
References sctp_hmaclist::hmac, sctp_hmaclist::max_algo, sctp_hmaclist::num_algo, and sctp_alloc_hmaclist().
Referenced by sctp_do_peeloff(), sctp_handle_cookie_echo(), and sctp_initialize_auth_params().
|
static |
Definition at line 591 of file sctp_auth.c.
References sctp_key::key, sctp_shared_key::key, sctp_shared_key::keyid, sctp_key::keylen, sctp_alloc_sharedkey(), and sctp_set_key().
Referenced by sctp_copy_skeylist().
int sctp_copy_skeylist | ( | const struct sctp_keyhead * | src, |
struct sctp_keyhead * | dest | ||
) |
Definition at line 609 of file sctp_auth.c.
References count, next, sctp_copy_sharedkey(), sctp_free_sharedkey(), and sctp_insert_sharedkey().
Referenced by sctp_auth_get_cookie_params(), sctp_do_peeloff(), and sctp_initialize_auth_params().
Definition at line 1299 of file sctp_auth.c.
References sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_association::authinfo, sctp_shared_key::deactivated, sctp_shared_key::refcount, sctp_find_sharedkey(), SCTP_NOTIFY_AUTH_FREE_KEY, SCTP_SO_LOCKED, sctp_ulp_notify(), and sctp_association::shared_keys.
Referenced by sctp_setopt().
int sctp_deact_sharedkey_ep | ( | struct sctp_inpcb * | inp, |
uint16_t | keyid | ||
) |
Definition at line 1333 of file sctp_auth.c.
References sctp_pcb::default_keyid, next, sctp_inpcb::sctp_ep, sctp_find_sharedkey(), sctp_free_sharedkey(), and sctp_pcb::shared_keys.
Referenced by sctp_setopt().
sctp_hmaclist_t * sctp_default_supported_hmaclist | ( | void | ) |
Definition at line 704 of file sctp_auth.c.
References sctp_alloc_hmaclist(), sctp_auth_add_hmacid(), SCTP_AUTH_HMAC_ID_SHA1, and SCTP_AUTH_HMAC_ID_SHA256.
Referenced by sctp_inpcb_alloc().
Definition at line 1186 of file sctp_auth.c.
References sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_association::authinfo, next, sctp_shared_key::refcount, sctp_clear_cachedkeys(), sctp_find_sharedkey(), sctp_free_sharedkey(), and sctp_association::shared_keys.
Referenced by sctp_setopt().
int sctp_delete_sharedkey_ep | ( | struct sctp_inpcb * | inp, |
uint16_t | keyid | ||
) |
Definition at line 1220 of file sctp_auth.c.
References sctp_pcb::default_keyid, next, sctp_clear_cachedkeys_ep(), sctp_inpcb::sctp_ep, sctp_find_sharedkey(), sctp_free_sharedkey(), and sctp_pcb::shared_keys.
Referenced by sctp_setopt().
void sctp_fill_hmac_digest_m | ( | struct mbuf * | m, |
uint32_t | auth_offset, | ||
struct sctp_auth_chunk * | auth, | ||
struct sctp_tcb * | stcb, | ||
uint16_t | keyid | ||
) |
Definition at line 1502 of file sctp_auth.c.
References sctp_tcb::asoc, sctp_authinformation::assoc_key, sctp_authinformation::assoc_keyid, sctp_association::authinfo, sctp_auth_chunk::hmac, sctp_shared_key::key, sctp_association::peer_hmac_id, sctp_authinformation::peer_random, sctp_authinformation::random, sctp_compute_hashkey(), sctp_compute_hmac_m(), SCTP_DEBUG_AUTH1, sctp_find_sharedkey(), sctp_free_key(), sctp_get_hmac_digest_len(), sctp_print_key(), SCTP_SIZE32, SCTPDBG, sctp_auth_chunk::shared_key_id, and sctp_association::shared_keys.
Referenced by sctp_lowlevel_chunk_output().
sctp_sharedkey_t * sctp_find_sharedkey | ( | struct sctp_keyhead * | shared_keys, |
uint16_t | key_id | ||
) |
Definition at line 488 of file sctp_auth.c.
References sctp_shared_key::keyid, and next.
Referenced by sctp_auth_key_acquire(), sctp_auth_key_release(), sctp_auth_setactivekey(), sctp_auth_setactivekey_ep(), sctp_deact_sharedkey(), sctp_deact_sharedkey_ep(), sctp_delete_sharedkey(), sctp_delete_sharedkey_ep(), sctp_fill_hmac_digest_m(), and sctp_handle_auth().
void sctp_free_authinfo | ( | sctp_authinfo_t * | authinfo | ) |
Definition at line 795 of file sctp_auth.c.
References sctp_authinformation::assoc_key, sctp_authinformation::peer_random, sctp_authinformation::random, sctp_authinformation::recv_key, and sctp_free_key().
Referenced by sctp_free_assoc().
void sctp_free_chunklist | ( | sctp_auth_chklist_t * | list | ) |
Definition at line 77 of file sctp_auth.c.
References SCTP_FREE.
Referenced by sctp_do_peeloff(), sctp_free_assoc(), sctp_handle_cookie_echo(), and sctp_inpcb_free().
void sctp_free_hmaclist | ( | sctp_hmaclist_t * | list | ) |
Definition at line 648 of file sctp_auth.c.
References SCTP_FREE.
Referenced by sctp_auth_get_cookie_params(), sctp_do_peeloff(), sctp_free_assoc(), sctp_handle_cookie_echo(), sctp_inpcb_free(), sctp_load_addresses_from_init(), and sctp_setopt().
void sctp_free_key | ( | sctp_key_t * | key | ) |
Definition at line 259 of file sctp_auth.c.
References SCTP_FREE.
Referenced by sctp_auth_get_cookie_params(), sctp_clear_cachedkeys(), sctp_fill_hmac_digest_m(), sctp_free_authinfo(), sctp_free_sharedkey(), sctp_handle_auth(), sctp_initialize_auth_params(), sctp_load_addresses_from_init(), and sctp_setopt().
void sctp_free_sharedkey | ( | sctp_sharedkey_t * | skey | ) |
Definition at line 475 of file sctp_auth.c.
References sctp_shared_key::key, sctp_shared_key::refcount, SCTP_DECREMENT_AND_CHECK_REFCOUNT, SCTP_FREE, and sctp_free_key().
Referenced by sctp_auth_key_release(), sctp_copy_skeylist(), sctp_deact_sharedkey_ep(), sctp_delete_sharedkey(), sctp_delete_sharedkey_ep(), sctp_free_assoc(), sctp_inpcb_free(), and sctp_insert_sharedkey().
sctp_key_t * sctp_generate_random_key | ( | uint32_t | keylen | ) |
Definition at line 316 of file sctp_auth.c.
References sctp_key::key, sctp_key::keylen, sctp_alloc_key(), and SCTP_READ_RANDOM.
Definition at line 814 of file sctp_auth.c.
References sctp_get_hmac_digest_len(), and SCTP_SIZE32.
Referenced by sctp_chunk_retransmission(), sctp_get_frag_point(), sctp_med_chunk_output(), and sctp_pathmtu_adjustment().
|
inlinestatic |
Definition at line 837 of file sctp_auth.c.
References SCTP_AUTH_HMAC_ID_RSVD, SCTP_AUTH_HMAC_ID_SHA1, and SCTP_AUTH_HMAC_ID_SHA256.
Referenced by sctp_compute_hmac(), sctp_compute_hmac_m(), sctp_hmac(), and sctp_hmac_m().
Definition at line 823 of file sctp_auth.c.
References SCTP_AUTH_DIGEST_LEN_SHA1, SCTP_AUTH_DIGEST_LEN_SHA256, SCTP_AUTH_HMAC_ID_SHA1, and SCTP_AUTH_HMAC_ID_SHA256.
Referenced by sctp_add_auth_chunk(), sctp_compute_hmac(), sctp_compute_hmac_m(), sctp_fill_hmac_digest_m(), sctp_get_auth_chunk_len(), sctp_handle_auth(), sctp_hmac(), and sctp_hmac_m().
|
static |
Definition at line 304 of file sctp_auth.c.
References sctp_key::keylen.
Referenced by sctp_compare_key(), and sctp_compute_hashkey().
int sctp_handle_auth | ( | struct sctp_tcb * | stcb, |
struct sctp_auth_chunk * | auth, | ||
struct mbuf * | m, | ||
uint32_t | offset | ||
) |
Definition at line 1590 of file sctp_auth.c.
References sctp_tcb::asoc, sctp_association::authinfo, sctp_error_auth_invalid_hmac::cause, sctp_auth_chunk::ch, sctp_chunkhdr::chunk_length, sctp_error_cause::code, sctp_auth_chunk::hmac, sctp_error_auth_invalid_hmac::hmac_id, sctp_auth_chunk::hmac_id, sctp_shared_key::key, sctp_error_cause::length, sctp_association::local_hmacs, sctp_authinformation::peer_random, sctp_authinformation::random, sctp_authinformation::recv_key, sctp_authinformation::recv_keyid, SCTP_AUTH_DIGEST_LEN_MAX, sctp_auth_is_supported_hmac(), SCTP_AUTH_NEW_KEY, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_CAUSE_UNSUPPORTED_HMACID, sctp_compute_hashkey(), sctp_compute_hmac_m(), SCTP_DEBUG_AUTH1, sctp_find_sharedkey(), sctp_free_key(), sctp_get_hmac_digest_len(), sctp_get_mbuf_for_msg(), sctp_notify_authentication(), sctp_print_key(), sctp_queue_op_err(), SCTP_SIZE32, SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, sctp_zero_m(), SCTPDBG, sctp_auth_chunk::shared_key_id, and sctp_association::shared_keys.
Referenced by sctp_process_control(), and sctp_process_cookie_new().
uint32_t sctp_hmac | ( | uint16_t | hmac_algo, |
uint8_t * | key, | ||
uint32_t | keylen, | ||
uint8_t * | text, | ||
uint32_t | textlen, | ||
uint8_t * | digest | ||
) |
Definition at line 915 of file sctp_auth.c.
References SCTP_AUTH_DIGEST_LEN_MAX, sctp_get_hmac_block_len(), sctp_get_hmac_digest_len(), sctp_hmac_final(), sctp_hmac_init(), and sctp_hmac_update().
Referenced by sctp_compute_hmac(), and sctp_fill_random_store().
|
static |
Definition at line 887 of file sctp_auth.c.
References SCTP_AUTH_HMAC_ID_RSVD, SCTP_AUTH_HMAC_ID_SHA1, SCTP_AUTH_HMAC_ID_SHA256, SCTP_SHA1_FINAL, SCTP_SHA256_FINAL, sctp_hash_context::sha1, and sctp_hash_context::sha256.
Referenced by sctp_compute_hmac(), sctp_compute_hmac_m(), sctp_hmac(), and sctp_hmac_m().
|
static |
Definition at line 852 of file sctp_auth.c.
References SCTP_AUTH_HMAC_ID_RSVD, SCTP_AUTH_HMAC_ID_SHA1, SCTP_AUTH_HMAC_ID_SHA256, SCTP_SHA1_INIT, SCTP_SHA256_INIT, sctp_hash_context::sha1, and sctp_hash_context::sha256.
Referenced by sctp_compute_hmac(), sctp_compute_hmac_m(), sctp_hmac(), and sctp_hmac_m().
uint32_t sctp_hmac_m | ( | uint16_t | hmac_algo, |
uint8_t * | key, | ||
uint32_t | keylen, | ||
struct mbuf * | m, | ||
uint32_t | m_offset, | ||
uint8_t * | digest, | ||
uint32_t | trailer | ||
) |
Definition at line 975 of file sctp_auth.c.
References SCTP_AUTH_DIGEST_LEN_MAX, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_get_hmac_block_len(), sctp_get_hmac_digest_len(), sctp_hmac_final(), sctp_hmac_init(), and sctp_hmac_update().
Referenced by sctp_compute_hmac_m(), sctp_handle_cookie_echo(), and sctp_send_initiate_ack().
|
static |
Definition at line 869 of file sctp_auth.c.
References SCTP_AUTH_HMAC_ID_RSVD, SCTP_AUTH_HMAC_ID_SHA1, SCTP_AUTH_HMAC_ID_SHA256, SCTP_SHA1_UPDATE, SCTP_SHA256_UPDATE, sctp_hash_context::sha1, and sctp_hash_context::sha256.
Referenced by sctp_compute_hmac(), sctp_compute_hmac_m(), sctp_hmac(), and sctp_hmac_m().
void sctp_initialize_auth_params | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb | ||
) |
Definition at line 1915 of file sctp_auth.c.
References sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_association::authinfo, sctp_auth_chklist::chunks, sctp_pcb::default_keyid, sctp_hmaclist::hmac, sctp_key::key, sctp_pcb::local_auth_chunks, sctp_association::local_auth_chunks, sctp_pcb::local_hmacs, sctp_association::local_hmacs, sctp_hmaclist::num_algo, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_authinformation::random, sctp_authinformation::random_len, sctp_alloc_key(), SCTP_AUTH_RANDOM_SIZE_DEFAULT, SCTP_CHUNK_LIST, sctp_copy_chunklist(), sctp_copy_hmaclist(), sctp_copy_skeylist(), sctp_inpcb::sctp_ep, sctp_free_key(), SCTP_HMAC_LIST, SCTP_RANDOM, SCTP_READ_RANDOM, sctp_serialize_hmaclist(), sctp_pcb::shared_keys, and sctp_association::shared_keys.
Referenced by sctp_aloc_assoc_locked().
int sctp_insert_sharedkey | ( | struct sctp_keyhead * | shared_keys, |
sctp_sharedkey_t * | new_skey | ||
) |
Definition at line 500 of file sctp_auth.c.
References sctp_shared_key::deactivated, sctp_shared_key::keyid, next, sctp_shared_key::refcount, SCTP_DEBUG_AUTH1, sctp_free_sharedkey(), and SCTPDBG.
Referenced by sctp_copy_skeylist(), sctp_inpcb_alloc(), and sctp_setopt().
uint16_t sctp_negotiate_hmacid | ( | sctp_hmaclist_t * | peer, |
sctp_hmaclist_t * | local | ||
) |
Definition at line 722 of file sctp_auth.c.
References sctp_hmaclist::hmac, sctp_hmaclist::num_algo, SCTP_AUTH_HMAC_ID_RSVD, SCTP_DEBUG_AUTH1, and SCTPDBG.
Referenced by sctp_auth_get_cookie_params(), and sctp_process_init_ack().
void sctp_notify_authentication | ( | struct sctp_tcb * | stcb, |
uint32_t | indication, | ||
uint16_t | keyid, | ||
uint16_t | alt_keyid, | ||
int | so_locked | ||
) |
Definition at line 1710 of file sctp_auth.c.
References sctp_tcb::asoc, sctp_authkey_event::auth_altkeynumber, sctp_authkey_event::auth_assoc_id, sctp_authkey_event::auth_flags, sctp_authkey_event::auth_indication, sctp_authkey_event::auth_keynumber, sctp_authkey_event::auth_length, sctp_authkey_event::auth_type, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_AUTHENTICATION_EVENT, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_AUTHEVNT, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_READ_LOCK_NOT_HELD, sctp_tcb::sctp_socket, SCTP_STATE_CLOSED_SOCKET, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, sctp_association::state, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_handle_auth(), and sctp_ulp_notify().
int sctp_pack_auth_chunks | ( | const sctp_auth_chklist_t * | list, |
uint8_t * | ptr | ||
) |
Definition at line 177 of file sctp_auth.c.
References sctp_auth_chklist::chunks, and sctp_auth_chklist::num_chunks.
void sctp_print_key | ( | sctp_key_t * | key, |
const char * | str | ||
) |
Definition at line 266 of file sctp_auth.c.
References sctp_key::key, sctp_key::keylen, and SCTP_PRINTF.
Referenced by sctp_fill_hmac_digest_m(), and sctp_handle_auth().
int sctp_serialize_auth_chunks | ( | const sctp_auth_chklist_t * | list, |
uint8_t * | ptr | ||
) |
Definition at line 160 of file sctp_auth.c.
References sctp_auth_chklist::chunks, and count.
Referenced by sctp_getopt(), sctp_send_initiate(), and sctp_send_initiate_ack().
int sctp_serialize_hmaclist | ( | sctp_hmaclist_t * | list, |
uint8_t * | ptr | ||
) |
Definition at line 749 of file sctp_auth.c.
References sctp_hmaclist::hmac, and sctp_hmaclist::num_algo.
Referenced by sctp_initialize_auth_params(), sctp_send_initiate(), and sctp_send_initiate_ack().
sctp_key_t * sctp_set_key | ( | uint8_t * | key, |
uint32_t | keylen | ||
) |
Definition at line 331 of file sctp_auth.c.
References sctp_key::key, and sctp_alloc_key().
Referenced by sctp_copy_sharedkey(), and sctp_setopt().
void sctp_show_key | ( | sctp_key_t * | key, |
const char * | str | ||
) |
Definition at line 285 of file sctp_auth.c.
References sctp_key::key, sctp_key::keylen, and SCTP_PRINTF.
int sctp_unpack_auth_chunks | ( | const uint8_t * | ptr, |
uint8_t | num_chunks, | ||
sctp_auth_chklist_t * | list | ||
) |
Definition at line 209 of file sctp_auth.c.
References sctp_auth_add_chunk().
int sctp_validate_init_auth_params | ( | struct mbuf * | m, |
int | offset, | ||
int | limit | ||
) |
Definition at line 1772 of file sctp_auth.c.
References sctp_supported_chunk_types_param::chunk_types, sctp_auth_chunk_list::chunk_types, sctp_auth_hmac_algo::hmac_ids, sctp_paramhdr::param_length, sctp_paramhdr::param_type, SCTP_ASCONF, SCTP_ASCONF_ACK, SCTP_AUTH_RANDOM_SIZE_REQUIRED, SCTP_CHUNK_LIST, SCTP_DEBUG_AUTH1, sctp_get_next_param(), SCTP_HMAC_LIST, SCTP_PARAM_BUFFER_SIZE, SCTP_RANDOM, SCTP_SIZE32, SCTP_SMALL_CHUNK_STORE, SCTP_SUPPORTED_CHUNK_EXT, sctp_verify_hmac_param(), and SCTPDBG.
Referenced by sctp_handle_init().
int sctp_verify_hmac_param | ( | struct sctp_auth_hmac_algo * | hmacs, |
uint32_t | num_hmacs | ||
) |
Definition at line 766 of file sctp_auth.c.
References sctp_auth_hmac_algo::hmac_ids, and SCTP_AUTH_HMAC_ID_SHA1.
Referenced by sctp_load_addresses_from_init(), and sctp_validate_init_auth_params().
Definition at line 1552 of file sctp_auth.c.
References SCTP_BUF_LEN, and SCTP_BUF_NEXT.
Referenced by sctp_handle_auth().