Lines Matching refs:ep
353 int sctp_auth_asoc_copy_shkeys(const struct sctp_endpoint *ep, in sctp_auth_asoc_copy_shkeys() argument
362 key_for_each(sh_key, &ep->endpoint_shared_keys) { in sctp_auth_asoc_copy_shkeys()
454 int sctp_auth_init_hmacs(struct sctp_endpoint *ep, gfp_t gfp) in sctp_auth_init_hmacs() argument
460 if (ep->auth_hmacs) in sctp_auth_init_hmacs()
464 ep->auth_hmacs = kcalloc(SCTP_AUTH_NUM_HMACS, in sctp_auth_init_hmacs()
467 if (!ep->auth_hmacs) in sctp_auth_init_hmacs()
481 if (ep->auth_hmacs[id]) in sctp_auth_init_hmacs()
489 ep->auth_hmacs[id] = tfm; in sctp_auth_init_hmacs()
496 sctp_auth_destroy_hmacs(ep->auth_hmacs); in sctp_auth_init_hmacs()
497 ep->auth_hmacs = NULL; in sctp_auth_init_hmacs()
609 struct sctp_endpoint *ep; in sctp_auth_asoc_set_default_hmac() local
620 ep = asoc->ep; in sctp_auth_asoc_set_default_hmac()
629 if (ep->auth_hmacs[id]) { in sctp_auth_asoc_set_default_hmac()
739 tfm = asoc->ep->auth_hmacs[hmac_id]; in sctp_auth_calculate_hmac()
756 int sctp_auth_ep_add_chunkid(struct sctp_endpoint *ep, __u8 chunk_id) in sctp_auth_ep_add_chunkid() argument
758 struct sctp_chunks_param *p = ep->auth_chunk_list; in sctp_auth_ep_add_chunkid()
778 int sctp_auth_ep_set_hmacs(struct sctp_endpoint *ep, in sctp_auth_ep_set_hmacs() argument
805 ep->auth_hmacs_list->hmac_ids[i] = in sctp_auth_ep_set_hmacs()
807 ep->auth_hmacs_list->param_hdr.length = in sctp_auth_ep_set_hmacs()
817 int sctp_auth_set_key(struct sctp_endpoint *ep, in sctp_auth_set_key() argument
834 if (!ep->auth_enable) in sctp_auth_set_key()
836 sh_keys = &ep->endpoint_shared_keys; in sctp_auth_set_key()
880 int sctp_auth_set_active_key(struct sctp_endpoint *ep, in sctp_auth_set_active_key() argument
894 if (!ep->auth_enable) in sctp_auth_set_active_key()
896 sh_keys = &ep->endpoint_shared_keys; in sctp_auth_set_active_key()
918 ep->active_key_id = key_id; in sctp_auth_set_active_key()
923 int sctp_auth_del_key_id(struct sctp_endpoint *ep, in sctp_auth_del_key_id() argument
942 if (!ep->auth_enable) in sctp_auth_del_key_id()
944 if (ep->active_key_id == key_id) in sctp_auth_del_key_id()
947 sh_keys = &ep->endpoint_shared_keys; in sctp_auth_del_key_id()
967 int sctp_auth_deact_key_id(struct sctp_endpoint *ep, in sctp_auth_deact_key_id() argument
985 if (!ep->auth_enable) in sctp_auth_deact_key_id()
987 if (ep->active_key_id == key_id) in sctp_auth_deact_key_id()
990 sh_keys = &ep->endpoint_shared_keys; in sctp_auth_deact_key_id()
1022 int sctp_auth_init(struct sctp_endpoint *ep, gfp_t gfp) in sctp_auth_init() argument
1030 if (!ep->auth_hmacs_list) { in sctp_auth_init()
1046 ep->auth_hmacs_list = auth_hmacs; in sctp_auth_init()
1049 if (!ep->auth_chunk_list) { in sctp_auth_init()
1060 ep->auth_chunk_list = auth_chunks; in sctp_auth_init()
1066 err = sctp_auth_init_hmacs(ep, gfp); in sctp_auth_init()
1074 kfree(ep->auth_hmacs_list); in sctp_auth_init()
1075 kfree(ep->auth_chunk_list); in sctp_auth_init()
1076 ep->auth_hmacs_list = NULL; in sctp_auth_init()
1077 ep->auth_chunk_list = NULL; in sctp_auth_init()
1081 void sctp_auth_free(struct sctp_endpoint *ep) in sctp_auth_free() argument
1083 kfree(ep->auth_hmacs_list); in sctp_auth_free()
1084 kfree(ep->auth_chunk_list); in sctp_auth_free()
1085 ep->auth_hmacs_list = NULL; in sctp_auth_free()
1086 ep->auth_chunk_list = NULL; in sctp_auth_free()
1087 sctp_auth_destroy_hmacs(ep->auth_hmacs); in sctp_auth_free()
1088 ep->auth_hmacs = NULL; in sctp_auth_free()