Lines Matching refs:asoc

222 				    const struct sctp_association *asoc,
226 (struct sctp_random_param *)asoc->c.auth_random,
227 (struct sctp_chunks_param *)asoc->c.auth_chunks,
228 (struct sctp_hmac_algo_param *)asoc->c.auth_hmacs, gfp);
233 const struct sctp_association *asoc,
236 return sctp_auth_make_key_vector(asoc->peer.peer_random,
237 asoc->peer.peer_chunks,
238 asoc->peer.peer_hmacs,
287 const struct sctp_association *asoc,
311 local_key_vector = sctp_auth_make_local_vector(asoc, gfp);
312 peer_key_vector = sctp_auth_make_peer_vector(asoc, gfp);
354 struct sctp_association *asoc,
360 BUG_ON(!list_empty(&asoc->endpoint_shared_keys));
369 list_add(&new->key_list, &asoc->endpoint_shared_keys);
375 sctp_auth_destroy_keys(&asoc->endpoint_shared_keys);
383 int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp)
392 if (!asoc->peer.auth_capable)
400 ep_key = sctp_auth_get_shkey(asoc, asoc->active_key_id);
403 secret = sctp_auth_asoc_create_secret(asoc, ep_key, gfp);
407 sctp_auth_key_put(asoc->asoc_shared_key);
408 asoc->asoc_shared_key = secret;
409 asoc->shkey = ep_key;
414 list_for_each_entry(chunk, &asoc->outqueue.out_chunk_list, list) {
415 if (sctp_auth_send_cid(chunk->chunk_hdr->type, asoc)) {
418 chunk->shkey = asoc->shkey;
430 const struct sctp_association *asoc,
436 key_for_each(key, &asoc->endpoint_shared_keys) {
524 struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc)
532 if (asoc->default_hmac_id)
533 return &sctp_hmac_list[asoc->default_hmac_id];
538 hmacs = asoc->peer.peer_hmacs;
584 int sctp_auth_asoc_verify_hmac_id(const struct sctp_association *asoc,
590 if (!asoc)
593 hmacs = (struct sctp_hmac_algo_param *)asoc->c.auth_hmacs;
606 void sctp_auth_asoc_set_default_hmac(struct sctp_association *asoc,
615 if (asoc->default_hmac_id)
620 ep = asoc->ep;
630 asoc->default_hmac_id = id;
674 int sctp_auth_send_cid(enum sctp_cid chunk, const struct sctp_association *asoc)
676 if (!asoc)
679 if (!asoc->peer.auth_capable)
682 return __sctp_auth_cid(chunk, asoc->peer.peer_chunks);
686 int sctp_auth_recv_cid(enum sctp_cid chunk, const struct sctp_association *asoc)
688 if (!asoc)
691 if (!asoc->peer.auth_capable)
695 (struct sctp_chunks_param *)asoc->c.auth_chunks);
707 void sctp_auth_calculate_hmac(const struct sctp_association *asoc,
725 if (key_id == asoc->active_key_id)
726 asoc_key = asoc->asoc_shared_key;
729 asoc_key = sctp_auth_asoc_create_secret(asoc, ep_key, gfp);
739 tfm = asoc->ep->auth_hmacs[hmac_id];
818 struct sctp_association *asoc,
829 if (asoc) {
830 if (!asoc->peer.auth_capable)
832 sh_keys = &asoc->endpoint_shared_keys;
868 if (asoc && asoc->active_key_id == auth_key->sca_keynumber &&
869 sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL)) {
881 struct sctp_association *asoc,
889 if (asoc) {
890 if (!asoc->peer.auth_capable)
892 sh_keys = &asoc->endpoint_shared_keys;
909 if (asoc) {
910 __u16 active_key_id = asoc->active_key_id;
912 asoc->active_key_id = key_id;
913 if (sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL)) {
914 asoc->active_key_id = active_key_id;
924 struct sctp_association *asoc,
934 if (asoc) {
935 if (!asoc->peer.auth_capable)
937 if (asoc->active_key_id == key_id)
940 sh_keys = &asoc->endpoint_shared_keys;
968 struct sctp_association *asoc, __u16 key_id)
977 if (asoc) {
978 if (!asoc->peer.auth_capable)
980 if (asoc->active_key_id == key_id)
983 sh_keys = &asoc->endpoint_shared_keys;
1007 if (asoc && !list_empty(&key->key_list) &&
1011 ev = sctp_ulpevent_make_authkey(asoc, key->key_id,
1014 asoc->stream.si->enqueue_event(&asoc->ulpq, ev);