Lines Matching refs:ahp
126 struct ah_data *ahp = x->data;
132 icv = ah_tmp_icv(ahp->ahash, iph, ihl);
133 memcpy(ah->auth_data, icv, ahp->icv_trunc_len);
159 struct ah_data *ahp;
165 ahp = x->data;
166 ahash = ahp->ahash;
190 memset(ah->auth_data, 0, ahp->icv_trunc_len);
216 ah->hdrlen = (XFRM_ALIGN4(sizeof(*ah) + ahp->icv_trunc_len) >> 2) - 2;
218 ah->hdrlen = (XFRM_ALIGN8(sizeof(*ah) + ahp->icv_trunc_len) >> 2) - 2;
249 memcpy(ah->auth_data, icv, ahp->icv_trunc_len);
272 struct ah_data *ahp = x->data;
282 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len);
284 err = crypto_memneq(icv, auth_data, ahp->icv_trunc_len) ? -EBADMSG : 0;
317 struct ah_data *ahp;
328 ahp = x->data;
329 ahash = ahp->ahash;
335 if (ah_hlen != XFRM_ALIGN4(sizeof(*ah) + ahp->icv_full_len) &&
336 ah_hlen != XFRM_ALIGN4(sizeof(*ah) + ahp->icv_trunc_len))
339 if (ah_hlen != XFRM_ALIGN8(sizeof(*ah) + ahp->icv_full_len) &&
340 ah_hlen != XFRM_ALIGN8(sizeof(*ah) + ahp->icv_trunc_len))
369 ahp->icv_trunc_len + seqhi_len);
377 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len);
383 memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
384 memset(ah->auth_data, 0, ahp->icv_trunc_len);
422 err = crypto_memneq(icv, auth_data, ahp->icv_trunc_len) ? -EBADMSG : 0;
475 struct ah_data *ahp = NULL;
485 ahp = kzalloc(sizeof(*ahp), GFP_KERNEL);
486 if (!ahp)
493 ahp->ahash = ahash;
516 ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8;
517 ahp->icv_trunc_len = x->aalg->alg_trunc_len/8;
521 ahp->icv_trunc_len);
524 ahp->icv_trunc_len);
527 x->data = ahp;
532 if (ahp) {
533 crypto_free_ahash(ahp->ahash);
534 kfree(ahp);
541 struct ah_data *ahp = x->data;
543 if (!ahp)
546 crypto_free_ahash(ahp->ahash);
547 kfree(ahp);