Lines Matching full:asoc

549 	skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, key_id);  in sctp_auth_key_acquire()
566 skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, key_id); in sctp_auth_key_release()
1147 if (keyid == stcb->asoc.authinfo.assoc_keyid) { in sctp_clear_cachedkeys()
1148 sctp_free_key(stcb->asoc.authinfo.assoc_key); in sctp_clear_cachedkeys()
1149 stcb->asoc.authinfo.assoc_key = NULL; in sctp_clear_cachedkeys()
1151 if (keyid == stcb->asoc.authinfo.recv_keyid) { in sctp_clear_cachedkeys()
1152 sctp_free_key(stcb->asoc.authinfo.recv_key); in sctp_clear_cachedkeys()
1153 stcb->asoc.authinfo.recv_key = NULL; in sctp_clear_cachedkeys()
1191 if (keyid == stcb->asoc.authinfo.active_keyid) in sctp_delete_sharedkey()
1195 skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, keyid); in sctp_delete_sharedkey()
1254 skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, keyid); in sctp_auth_setactivekey()
1265 stcb->asoc.authinfo.active_keyid = keyid; in sctp_auth_setactivekey()
1304 if (keyid == stcb->asoc.authinfo.active_keyid) in sctp_deact_sharedkey()
1308 skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, keyid); in sctp_deact_sharedkey()
1413 if (stcb->asoc.local_hmacs != NULL) in sctp_auth_get_cookie_params()
1414 sctp_free_hmaclist(stcb->asoc.local_hmacs); in sctp_auth_get_cookie_params()
1415 stcb->asoc.local_hmacs = sctp_alloc_hmaclist(num_hmacs); in sctp_auth_get_cookie_params()
1416 if (stcb->asoc.local_hmacs != NULL) { in sctp_auth_get_cookie_params()
1418 (void)sctp_auth_add_hmacid(stcb->asoc.local_hmacs, in sctp_auth_get_cookie_params()
1434 if (stcb->asoc.local_auth_chunks != NULL) in sctp_auth_get_cookie_params()
1435 sctp_clear_chunklist(stcb->asoc.local_auth_chunks); in sctp_auth_get_cookie_params()
1437 stcb->asoc.local_auth_chunks = sctp_alloc_chunklist(); in sctp_auth_get_cookie_params()
1440 stcb->asoc.local_auth_chunks); in sctp_auth_get_cookie_params()
1476 if (stcb->asoc.authinfo.random != NULL) in sctp_auth_get_cookie_params()
1477 sctp_free_key(stcb->asoc.authinfo.random); in sctp_auth_get_cookie_params()
1478 stcb->asoc.authinfo.random = new_key; in sctp_auth_get_cookie_params()
1479 stcb->asoc.authinfo.random_len = random_len; in sctp_auth_get_cookie_params()
1480 sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.assoc_keyid); in sctp_auth_get_cookie_params()
1481 sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.recv_keyid); in sctp_auth_get_cookie_params()
1484 stcb->asoc.peer_hmac_id = sctp_negotiate_hmacid(stcb->asoc.peer_hmacs, in sctp_auth_get_cookie_params()
1485 stcb->asoc.local_hmacs); in sctp_auth_get_cookie_params()
1489 stcb->asoc.authinfo.active_keyid = stcb->sctp_ep->sctp_ep.default_keyid; in sctp_auth_get_cookie_params()
1492 &stcb->asoc.shared_keys); in sctp_auth_get_cookie_params()
1510 digestlen = sctp_get_hmac_digest_len(stcb->asoc.peer_hmac_id); in sctp_fill_hmac_digest_m()
1514 if ((keyid != stcb->asoc.authinfo.assoc_keyid) || in sctp_fill_hmac_digest_m()
1515 (stcb->asoc.authinfo.assoc_key == NULL)) { in sctp_fill_hmac_digest_m()
1516 if (stcb->asoc.authinfo.assoc_key != NULL) { in sctp_fill_hmac_digest_m()
1518 sctp_free_key(stcb->asoc.authinfo.assoc_key); in sctp_fill_hmac_digest_m()
1520 skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, keyid); in sctp_fill_hmac_digest_m()
1527 stcb->asoc.authinfo.assoc_key = in sctp_fill_hmac_digest_m()
1528 sctp_compute_hashkey(stcb->asoc.authinfo.random, in sctp_fill_hmac_digest_m()
1529 stcb->asoc.authinfo.peer_random, key); in sctp_fill_hmac_digest_m()
1530 stcb->asoc.authinfo.assoc_keyid = keyid; in sctp_fill_hmac_digest_m()
1532 stcb->asoc.authinfo.assoc_keyid); in sctp_fill_hmac_digest_m()
1535 sctp_print_key(stcb->asoc.authinfo.assoc_key, in sctp_fill_hmac_digest_m()
1544 (void)sctp_compute_hmac_m(stcb->asoc.peer_hmac_id, stcb->asoc.authinfo.assoc_key, in sctp_fill_hmac_digest_m()
1614 if (!sctp_auth_is_supported_hmac(stcb->asoc.local_hmacs, hmac_id)) { in sctp_handle_auth()
1643 if ((stcb->asoc.authinfo.recv_key == NULL) || in sctp_handle_auth()
1644 (stcb->asoc.authinfo.recv_keyid != shared_key_id)) { in sctp_handle_auth()
1646 skey = sctp_find_sharedkey(&stcb->asoc.shared_keys, in sctp_handle_auth()
1657 if (stcb->asoc.authinfo.recv_keyid != shared_key_id) { in sctp_handle_auth()
1662 if (stcb->asoc.authinfo.recv_key != NULL) in sctp_handle_auth()
1663 sctp_free_key(stcb->asoc.authinfo.recv_key); in sctp_handle_auth()
1664 stcb->asoc.authinfo.recv_key = in sctp_handle_auth()
1665 sctp_compute_hashkey(stcb->asoc.authinfo.random, in sctp_handle_auth()
1666 stcb->asoc.authinfo.peer_random, skey->key); in sctp_handle_auth()
1667 stcb->asoc.authinfo.recv_keyid = shared_key_id; in sctp_handle_auth()
1670 sctp_print_key(stcb->asoc.authinfo.recv_key, "Recv Key"); in sctp_handle_auth()
1685 (void)sctp_compute_hmac_m(hmac_id, stcb->asoc.authinfo.recv_key, in sctp_handle_auth()
1732 auth->auth_altkeynumber = stcb->asoc.authinfo.recv_keyid; in sctp_notify_authentication()
1743 control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, in sctp_notify_authentication()
1744 0, 0, stcb->asoc.context, 0, 0, 0, m_notify); in sctp_notify_authentication()
1917 stcb->asoc.local_hmacs = sctp_copy_hmaclist(inp->sctp_ep.local_hmacs); in sctp_initialize_auth_params()
1918 if (stcb->asoc.local_hmacs != NULL) { in sctp_initialize_auth_params()
1919 hmacs_len = stcb->asoc.local_hmacs->num_algo * in sctp_initialize_auth_params()
1920 sizeof(stcb->asoc.local_hmacs->hmac[0]); in sctp_initialize_auth_params()
1923 stcb->asoc.local_auth_chunks = in sctp_initialize_auth_params()
1925 if (stcb->asoc.local_auth_chunks != NULL) { in sctp_initialize_auth_params()
1929 if (stcb->asoc.local_auth_chunks->chunks[i]) in sctp_initialize_auth_params()
1934 stcb->asoc.authinfo.active_keyid = inp->sctp_ep.default_keyid; in sctp_initialize_auth_params()
1938 &stcb->asoc.shared_keys); in sctp_initialize_auth_params()
1964 if (stcb->asoc.local_auth_chunks) { in sctp_initialize_auth_params()
1968 if (stcb->asoc.local_auth_chunks->chunks[i]) in sctp_initialize_auth_params()
1979 (void)sctp_serialize_hmaclist(stcb->asoc.local_hmacs, in sctp_initialize_auth_params()
1982 if (stcb->asoc.authinfo.random != NULL) in sctp_initialize_auth_params()
1983 sctp_free_key(stcb->asoc.authinfo.random); in sctp_initialize_auth_params()
1984 stcb->asoc.authinfo.random = new_key; in sctp_initialize_auth_params()
1985 stcb->asoc.authinfo.random_len = random_len; in sctp_initialize_auth_params()