Lines Matching refs:aead_req
48 static int tls_enc_record(struct aead_request *aead_req, in tls_enc_record() argument
113 aead_request_set_crypt(aead_req, sg_in, sg_out, len, iv); in tls_enc_record()
115 rc = crypto_aead_encrypt(aead_req); in tls_enc_record()
120 static void tls_init_aead_request(struct aead_request *aead_req, in tls_init_aead_request() argument
123 aead_request_set_tfm(aead_req, aead); in tls_init_aead_request()
124 aead_request_set_ad(aead_req, TLS_AAD_SPACE_SIZE); in tls_init_aead_request()
132 struct aead_request *aead_req; in tls_alloc_aead_request() local
134 aead_req = kzalloc(req_size, flags); in tls_alloc_aead_request()
135 if (aead_req) in tls_alloc_aead_request()
136 tls_init_aead_request(aead_req, aead); in tls_alloc_aead_request()
137 return aead_req; in tls_alloc_aead_request()
140 static int tls_enc_records(struct aead_request *aead_req, in tls_enc_records() argument
152 rc = tls_enc_record(aead_req, aead, aad, iv, in tls_enc_records()
317 struct aead_request *aead_req; in tls_enc_skb() local
321 aead_req = tls_alloc_aead_request(ctx->aead_send, GFP_ATOMIC); in tls_enc_skb()
322 if (!aead_req) in tls_enc_skb()
350 if (tls_enc_records(aead_req, ctx->aead_send, sg_in, sg_out, aad, iv, in tls_enc_skb()
364 kfree(aead_req); in tls_enc_skb()