webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Functions
sctp_auth.c File Reference
#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>

Functions

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)
 
sctp_key_tsctp_generate_random_key (uint32_t keylen)
 
sctp_key_tsctp_set_key (uint8_t *key, uint32_t keylen)
 
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 SCTP_UNUSED)
 
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)
 
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)
 
int sctp_verify_hmac (uint16_t hmac_algo, uint8_t *key, uint32_t keylen, uint8_t *text, uint32_t textlen, uint8_t *digest, uint32_t digestlen)
 
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)
 
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 SCTP_UNUSED)
 
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

◆ sctp_alloc_authinfo()

sctp_authinfo_t* sctp_alloc_authinfo ( void  )

◆ sctp_alloc_chunklist()

sctp_auth_chklist_t* sctp_alloc_chunklist ( void  )

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

◆ sctp_auth_add_chunk()

int sctp_auth_add_chunk ( uint8_t  chunk,
sctp_auth_chklist_t list 
)

◆ sctp_auth_add_hmacid()

int sctp_auth_add_hmacid ( sctp_hmaclist_t list,
uint16_t  hmac_id 
)

◆ sctp_auth_delete_chunk()

int sctp_auth_delete_chunk ( uint8_t  chunk,
sctp_auth_chklist_t list 
)

◆ sctp_auth_get_chklist_size()

size_t sctp_auth_get_chklist_size ( const sctp_auth_chklist_t list)

◆ sctp_auth_get_cookie_params()

void sctp_auth_get_cookie_params ( struct sctp_tcb stcb,
struct mbuf m,
uint32_t  offset,
uint32_t  length 
)

◆ sctp_auth_is_supported_hmac()

int sctp_auth_is_supported_hmac ( sctp_hmaclist_t list,
uint16_t  id 
)

◆ sctp_auth_key_acquire()

void sctp_auth_key_acquire ( struct sctp_tcb stcb,
uint16_t  key_id 
)

◆ sctp_auth_key_release()

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

◆ sctp_auth_setactivekey()

int sctp_auth_setactivekey ( struct sctp_tcb stcb,
uint16_t  keyid 
)

◆ sctp_auth_setactivekey_ep()

int sctp_auth_setactivekey_ep ( struct sctp_inpcb inp,
uint16_t  keyid 
)

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

◆ sctp_clear_chunklist()

void sctp_clear_chunklist ( sctp_auth_chklist_t chklist)

◆ sctp_compute_hashkey()

sctp_key_t* sctp_compute_hashkey ( sctp_key_t key1,
sctp_key_t key2,
sctp_key_t shared 
)

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

◆ sctp_copy_chunklist()

sctp_auth_chklist_t* sctp_copy_chunklist ( sctp_auth_chklist_t list)

◆ sctp_copy_hmaclist()

sctp_hmaclist_t* sctp_copy_hmaclist ( sctp_hmaclist_t list)

◆ sctp_copy_skeylist()

int sctp_copy_skeylist ( const struct sctp_keyhead *  src,
struct sctp_keyhead *  dest 
)

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

◆ sctp_default_supported_hmaclist()

sctp_hmaclist_t* sctp_default_supported_hmaclist ( void  )

◆ sctp_delete_sharedkey()

int sctp_delete_sharedkey ( struct sctp_tcb stcb,
uint16_t  keyid 
)

◆ sctp_delete_sharedkey_ep()

int sctp_delete_sharedkey_ep ( struct sctp_inpcb inp,
uint16_t  keyid 
)

◆ sctp_fill_hmac_digest_m()

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 
)

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

◆ sctp_free_chunklist()

void sctp_free_chunklist ( sctp_auth_chklist_t list)

◆ sctp_free_hmaclist()

void sctp_free_hmaclist ( sctp_hmaclist_t list)

◆ sctp_free_key()

void sctp_free_key ( sctp_key_t 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)

◆ sctp_get_auth_chunk_len()

uint32_t sctp_get_auth_chunk_len ( uint16_t  hmac_algo)

◆ sctp_get_hmac_digest_len()

uint32_t sctp_get_hmac_digest_len ( uint16_t  hmac_algo)

◆ sctp_handle_auth()

int sctp_handle_auth ( struct sctp_tcb stcb,
struct sctp_auth_chunk auth,
struct mbuf m,
uint32_t  offset 
)

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

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

◆ sctp_initialize_auth_params()

void sctp_initialize_auth_params ( struct sctp_inpcb inp,
struct sctp_tcb stcb 
)

◆ sctp_insert_sharedkey()

int sctp_insert_sharedkey ( struct sctp_keyhead *  shared_keys,
sctp_sharedkey_t new_skey 
)

◆ sctp_negotiate_hmacid()

uint16_t sctp_negotiate_hmacid ( sctp_hmaclist_t peer,
sctp_hmaclist_t local 
)

◆ sctp_notify_authentication()

void sctp_notify_authentication ( struct sctp_tcb stcb,
uint32_t  indication,
uint16_t  keyid,
uint16_t  alt_keyid,
int so_locked  SCTP_UNUSED 
)

◆ sctp_pack_auth_chunks()

int sctp_pack_auth_chunks ( const sctp_auth_chklist_t list,
uint8_t ptr 
)

◆ sctp_print_key()

void sctp_print_key ( sctp_key_t key,
const char *  str 
)

◆ sctp_serialize_auth_chunks()

int sctp_serialize_auth_chunks ( const sctp_auth_chklist_t list,
uint8_t ptr 
)

◆ sctp_serialize_hmaclist()

int sctp_serialize_hmaclist ( sctp_hmaclist_t list,
uint8_t ptr 
)

◆ sctp_set_key()

sctp_key_t* sctp_set_key ( uint8_t key,
uint32_t  keylen 
)

◆ sctp_show_key()

void sctp_show_key ( sctp_key_t key,
const char *  str 
)

◆ sctp_unpack_auth_chunks()

int sctp_unpack_auth_chunks ( const uint8_t ptr,
uint8_t  num_chunks,
sctp_auth_chklist_t list 
)

◆ sctp_validate_init_auth_params()

int sctp_validate_init_auth_params ( struct mbuf m,
int  offset,
int  limit 
)

◆ sctp_verify_hmac()

int sctp_verify_hmac ( uint16_t  hmac_algo,
uint8_t key,
uint32_t  keylen,
uint8_t text,
uint32_t  textlen,
uint8_t digest,
uint32_t  digestlen 
)

◆ sctp_verify_hmac_param()

int sctp_verify_hmac_param ( struct sctp_auth_hmac_algo hmacs,
uint32_t  num_hmacs 
)