Lines Matching refs:err

41 static void authenc_esn_request_complete(struct aead_request *req, int err)  in authenc_esn_request_complete()  argument
43 if (err != -EINPROGRESS) in authenc_esn_request_complete()
44 aead_request_complete(req, err); in authenc_esn_request_complete()
63 int err = -EINVAL; in crypto_authenc_esn_setkey() local
71 err = crypto_ahash_setkey(auth, keys.authkey, keys.authkeylen); in crypto_authenc_esn_setkey()
72 if (err) in crypto_authenc_esn_setkey()
78 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_esn_setkey()
81 return err; in crypto_authenc_esn_setkey()
105 static void authenc_esn_geniv_ahash_done(void *data, int err) in authenc_esn_geniv_ahash_done() argument
109 err = err ?: crypto_authenc_esn_genicv_tail(req, 0); in authenc_esn_geniv_ahash_done()
110 aead_request_complete(req, err); in authenc_esn_geniv_ahash_done()
149 static void crypto_authenc_esn_encrypt_done(void *data, int err) in crypto_authenc_esn_encrypt_done() argument
153 if (!err) in crypto_authenc_esn_encrypt_done()
154 err = crypto_authenc_esn_genicv(areq, 0); in crypto_authenc_esn_encrypt_done()
156 authenc_esn_request_complete(areq, err); in crypto_authenc_esn_encrypt_done()
170 int err; in crypto_authenc_esn_encrypt() local
187 err = crypto_skcipher_encrypt(skreq); in crypto_authenc_esn_encrypt()
188 if (err) in crypto_authenc_esn_encrypt()
189 return err; in crypto_authenc_esn_encrypt()
235 static void authenc_esn_verify_ahash_done(void *data, int err) in authenc_esn_verify_ahash_done() argument
239 err = err ?: crypto_authenc_esn_decrypt_tail(req, 0); in authenc_esn_verify_ahash_done()
240 authenc_esn_request_complete(req, err); in authenc_esn_verify_ahash_done()
257 int err; in crypto_authenc_esn_decrypt() local
283 err = crypto_ahash_digest(ahreq); in crypto_authenc_esn_decrypt()
284 if (err) in crypto_authenc_esn_decrypt()
285 return err; in crypto_authenc_esn_decrypt()
298 int err; in crypto_authenc_esn_init_tfm() local
305 err = PTR_ERR(enc); in crypto_authenc_esn_init_tfm()
328 return err; in crypto_authenc_esn_init_tfm()
357 int err; in crypto_authenc_esn_create() local
359 err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_AEAD, &mask); in crypto_authenc_esn_create()
360 if (err) in crypto_authenc_esn_create()
361 return err; in crypto_authenc_esn_create()
368 err = crypto_grab_ahash(&ctx->auth, aead_crypto_instance(inst), in crypto_authenc_esn_create()
370 if (err) in crypto_authenc_esn_create()
375 err = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst), in crypto_authenc_esn_create()
377 if (err) in crypto_authenc_esn_create()
381 err = -ENAMETOOLONG; in crypto_authenc_esn_create()
412 err = aead_register_instance(tmpl, inst); in crypto_authenc_esn_create()
413 if (err) { in crypto_authenc_esn_create()
417 return err; in crypto_authenc_esn_create()