FreeBSD kernel IPv4 code
sctp_auth.c File Reference
#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>
Include dependency graph for sctp_auth.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
void sctp_clear_chunklist (sctp_auth_chklist_t *chklist)
 
sctp_auth_chklist_tsctp_alloc_chunklist (void)
 
void sctp_free_chunklist (sctp_auth_chklist_t *list)
 
sctp_auth_chklist_tsctp_copy_chunklist (sctp_auth_chklist_t *list)
 
int sctp_auth_add_chunk (uint8_t chunk, sctp_auth_chklist_t *list)
 
int sctp_auth_delete_chunk (uint8_t chunk, sctp_auth_chklist_t *list)
 
size_t sctp_auth_get_chklist_size (const sctp_auth_chklist_t *list)
 
int sctp_serialize_auth_chunks (const sctp_auth_chklist_t *list, uint8_t *ptr)
 
int sctp_pack_auth_chunks (const sctp_auth_chklist_t *list, uint8_t *ptr)
 
int sctp_unpack_auth_chunks (const uint8_t *ptr, uint8_t num_chunks, sctp_auth_chklist_t *list)
 
sctp_key_tsctp_alloc_key (uint32_t keylen)
 
void sctp_free_key (sctp_key_t *key)
 
void sctp_print_key (sctp_key_t *key, const char *str)
 
void sctp_show_key (sctp_key_t *key, const char *str)
 
static uint32_t sctp_get_keylen (sctp_key_t *key)
 
sctp_key_tsctp_generate_random_key (uint32_t keylen)
 
sctp_key_tsctp_set_key (uint8_t *key, uint32_t keylen)
 
static int sctp_compare_key (sctp_key_t *key1, sctp_key_t *key2)
 
sctp_key_tsctp_compute_hashkey (sctp_key_t *key1, sctp_key_t *key2, sctp_key_t *shared)
 
sctp_sharedkey_tsctp_alloc_sharedkey (void)
 
void sctp_free_sharedkey (sctp_sharedkey_t *skey)
 
sctp_sharedkey_tsctp_find_sharedkey (struct sctp_keyhead *shared_keys, uint16_t key_id)
 
int sctp_insert_sharedkey (struct sctp_keyhead *shared_keys, sctp_sharedkey_t *new_skey)
 
void sctp_auth_key_acquire (struct sctp_tcb *stcb, uint16_t key_id)
 
void sctp_auth_key_release (struct sctp_tcb *stcb, uint16_t key_id, int so_locked)
 
static sctp_sharedkey_tsctp_copy_sharedkey (const sctp_sharedkey_t *skey)
 
int sctp_copy_skeylist (const struct sctp_keyhead *src, struct sctp_keyhead *dest)
 
sctp_hmaclist_tsctp_alloc_hmaclist (uint16_t num_hmacs)
 
void sctp_free_hmaclist (sctp_hmaclist_t *list)
 
int sctp_auth_add_hmacid (sctp_hmaclist_t *list, uint16_t hmac_id)
 
sctp_hmaclist_tsctp_copy_hmaclist (sctp_hmaclist_t *list)
 
sctp_hmaclist_tsctp_default_supported_hmaclist (void)
 
uint16_t sctp_negotiate_hmacid (sctp_hmaclist_t *peer, sctp_hmaclist_t *local)
 
int sctp_serialize_hmaclist (sctp_hmaclist_t *list, uint8_t *ptr)
 
int sctp_verify_hmac_param (struct sctp_auth_hmac_algo *hmacs, uint32_t num_hmacs)
 
sctp_authinfo_tsctp_alloc_authinfo (void)
 
void sctp_free_authinfo (sctp_authinfo_t *authinfo)
 
uint32_t sctp_get_auth_chunk_len (uint16_t hmac_algo)
 
uint32_t sctp_get_hmac_digest_len (uint16_t hmac_algo)
 
static int sctp_get_hmac_block_len (uint16_t hmac_algo)
 
static void sctp_hmac_init (uint16_t hmac_algo, sctp_hash_context_t *ctx)
 
static void sctp_hmac_update (uint16_t hmac_algo, sctp_hash_context_t *ctx, uint8_t *text, uint32_t textlen)
 
static void sctp_hmac_final (uint16_t hmac_algo, sctp_hash_context_t *ctx, uint8_t *digest)
 
uint32_t sctp_hmac (uint16_t hmac_algo, uint8_t *key, uint32_t keylen, uint8_t *text, uint32_t textlen, uint8_t *digest)
 
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)
 
uint32_t sctp_compute_hmac (uint16_t hmac_algo, sctp_key_t *key, uint8_t *text, uint32_t textlen, uint8_t *digest)
 
uint32_t sctp_compute_hmac_m (uint16_t hmac_algo, sctp_key_t *key, struct mbuf *m, uint32_t m_offset, uint8_t *digest)
 
int sctp_auth_is_supported_hmac (sctp_hmaclist_t *list, uint16_t id)
 
void sctp_clear_cachedkeys (struct sctp_tcb *stcb, uint16_t keyid)
 
void sctp_clear_cachedkeys_ep (struct sctp_inpcb *inp, uint16_t keyid)
 
int sctp_delete_sharedkey (struct sctp_tcb *stcb, uint16_t keyid)
 
int sctp_delete_sharedkey_ep (struct sctp_inpcb *inp, uint16_t keyid)
 
int sctp_auth_setactivekey (struct sctp_tcb *stcb, uint16_t keyid)
 
int sctp_auth_setactivekey_ep (struct sctp_inpcb *inp, uint16_t keyid)
 
int sctp_deact_sharedkey (struct sctp_tcb *stcb, uint16_t keyid)
 
int sctp_deact_sharedkey_ep (struct sctp_inpcb *inp, uint16_t keyid)
 
void sctp_auth_get_cookie_params (struct sctp_tcb *stcb, struct mbuf *m, uint32_t offset, uint32_t length)
 
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)
 
static void sctp_zero_m (struct mbuf *m, uint32_t m_offset, uint32_t size)
 
int sctp_handle_auth (struct sctp_tcb *stcb, struct sctp_auth_chunk *auth, struct mbuf *m, uint32_t offset)
 
void sctp_notify_authentication (struct sctp_tcb *stcb, uint32_t indication, uint16_t keyid, uint16_t alt_keyid, int so_locked)
 
int sctp_validate_init_auth_params (struct mbuf *m, int offset, int limit)
 
void sctp_initialize_auth_params (struct sctp_inpcb *inp, struct sctp_tcb *stcb)
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ sctp_alloc_authinfo()

sctp_authinfo_t * sctp_alloc_authinfo ( void  )

Definition at line 779 of file sctp_auth.c.

References SCTP_MALLOC.

◆ sctp_alloc_chunklist()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_alloc_hmaclist()

sctp_hmaclist_t * sctp_alloc_hmaclist ( uint16_t  num_hmacs)

◆ sctp_alloc_key()

sctp_key_t * sctp_alloc_key ( uint32_t  keylen)

◆ sctp_alloc_sharedkey()

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().

Here is the caller graph for this function:

◆ sctp_auth_add_chunk()

◆ sctp_auth_add_hmacid()

◆ sctp_auth_delete_chunk()

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().

Here is the caller graph for this function:

◆ sctp_auth_get_chklist_size()

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().

Here is the caller graph for this function:

◆ sctp_auth_get_cookie_params()

◆ sctp_auth_is_supported_hmac()

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().

Here is the caller graph for this function:

◆ sctp_auth_key_acquire()

void sctp_auth_key_acquire ( struct sctp_tcb stcb,
uint16_t  key_id 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_auth_key_release()

void sctp_auth_key_release ( struct sctp_tcb stcb,
uint16_t  key_id,
int  so_locked 
)

◆ sctp_auth_setactivekey()

int sctp_auth_setactivekey ( struct sctp_tcb stcb,
uint16_t  keyid 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_auth_setactivekey_ep()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_clear_cachedkeys()

void sctp_clear_cachedkeys ( struct sctp_tcb stcb,
uint16_t  keyid 
)

◆ sctp_clear_cachedkeys_ep()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_clear_chunklist()

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().

Here is the caller graph for this function:

◆ sctp_compare_key()

static int sctp_compare_key ( sctp_key_t key1,
sctp_key_t key2 
)
static

Definition at line 351 of file sctp_auth.c.

References sctp_key::key, and sctp_get_keylen().

Referenced by sctp_compute_hashkey().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_compute_hmac()

uint32_t sctp_compute_hmac ( uint16_t  hmac_algo,
sctp_key_t key,
uint8_t text,
uint32_t  textlen,
uint8_t digest 
)

◆ sctp_compute_hmac_m()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_copy_chunklist()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_copy_hmaclist()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_copy_sharedkey()

static sctp_sharedkey_t * sctp_copy_sharedkey ( const sctp_sharedkey_t skey)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_deact_sharedkey()

int sctp_deact_sharedkey ( struct sctp_tcb stcb,
uint16_t  keyid 
)

◆ sctp_deact_sharedkey_ep()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_default_supported_hmaclist()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_delete_sharedkey()

int sctp_delete_sharedkey ( struct sctp_tcb stcb,
uint16_t  keyid 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_delete_sharedkey_ep()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_fill_hmac_digest_m()

◆ sctp_find_sharedkey()

sctp_sharedkey_t * sctp_find_sharedkey ( struct sctp_keyhead *  shared_keys,
uint16_t  key_id 
)

◆ sctp_free_authinfo()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_free_chunklist()

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().

Here is the caller graph for this function:

◆ sctp_free_hmaclist()

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().

Here is the caller graph for this function:

◆ sctp_free_key()

◆ sctp_free_sharedkey()

void sctp_free_sharedkey ( sctp_sharedkey_t skey)

◆ sctp_generate_random_key()

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.

Here is the call graph for this function:

◆ sctp_get_auth_chunk_len()

uint32_t sctp_get_auth_chunk_len ( uint16_t  hmac_algo)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_get_hmac_block_len()

static int sctp_get_hmac_block_len ( uint16_t  hmac_algo)
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().

Here is the caller graph for this function:

◆ sctp_get_hmac_digest_len()

◆ sctp_get_keylen()

static uint32_t sctp_get_keylen ( sctp_key_t key)
static

Definition at line 304 of file sctp_auth.c.

References sctp_key::keylen.

Referenced by sctp_compare_key(), and sctp_compute_hashkey().

Here is the caller graph for this function:

◆ sctp_handle_auth()

◆ sctp_hmac()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_hmac_final()

static void sctp_hmac_final ( uint16_t  hmac_algo,
sctp_hash_context_t ctx,
uint8_t digest 
)
static

◆ sctp_hmac_init()

static void sctp_hmac_init ( uint16_t  hmac_algo,
sctp_hash_context_t ctx 
)
static

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_hmac_update()

static void sctp_hmac_update ( uint16_t  hmac_algo,
sctp_hash_context_t ctx,
uint8_t text,
uint32_t  textlen 
)
static

◆ sctp_initialize_auth_params()

◆ sctp_insert_sharedkey()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_negotiate_hmacid()

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().

Here is the caller graph for this function:

◆ sctp_notify_authentication()

◆ sctp_pack_auth_chunks()

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.

◆ sctp_print_key()

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().

Here is the caller graph for this function:

◆ sctp_serialize_auth_chunks()

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().

Here is the caller graph for this function:

◆ sctp_serialize_hmaclist()

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().

Here is the caller graph for this function:

◆ sctp_set_key()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctp_show_key()

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.

◆ sctp_unpack_auth_chunks()

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().

Here is the call graph for this function:

◆ sctp_validate_init_auth_params()

◆ sctp_verify_hmac_param()

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().

Here is the caller graph for this function:

◆ sctp_zero_m()

static void sctp_zero_m ( struct mbuf *  m,
uint32_t  m_offset,
uint32_t  size 
)
static

Definition at line 1552 of file sctp_auth.c.

References SCTP_BUF_LEN, and SCTP_BUF_NEXT.

Referenced by sctp_handle_auth().

Here is the caller graph for this function: