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;
476 struct ah_data *ahp = NULL;
490 ahp = kzalloc(sizeof(*ahp), GFP_KERNEL);
491 if (!ahp)
500 ahp->ahash = ahash;
522 ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8;
523 ahp->icv_trunc_len = x->aalg->alg_trunc_len/8;
527 ahp->icv_trunc_len);
530 ahp->icv_trunc_len);
533 x->data = ahp;
538 if (ahp) {
539 crypto_free_ahash(ahp->ahash);
540 kfree(ahp);
547 struct ah_data *ahp = x->data;
549 if (!ahp)
552 crypto_free_ahash(ahp->ahash);
553 kfree(ahp);