Lines Matching refs:err

38 static void authenc_request_complete(struct aead_request *req, int err)  in authenc_request_complete()  argument
40 if (err != -EINPROGRESS) in authenc_request_complete()
41 aead_request_complete(req, err); in authenc_request_complete()
89 int err = -EINVAL; in crypto_authenc_setkey() local
97 err = crypto_ahash_setkey(auth, keys.authkey, keys.authkeylen); in crypto_authenc_setkey()
98 if (err) in crypto_authenc_setkey()
104 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_setkey()
107 return err; in crypto_authenc_setkey()
110 static void authenc_geniv_ahash_done(void *data, int err) in authenc_geniv_ahash_done() argument
119 if (err) in authenc_geniv_ahash_done()
127 aead_request_complete(req, err); in authenc_geniv_ahash_done()
140 int err; in crypto_authenc_genicv() local
148 err = crypto_ahash_digest(ahreq); in crypto_authenc_genicv()
149 if (err) in crypto_authenc_genicv()
150 return err; in crypto_authenc_genicv()
158 static void crypto_authenc_encrypt_done(void *data, int err) in crypto_authenc_encrypt_done() argument
162 if (err) in crypto_authenc_encrypt_done()
165 err = crypto_authenc_genicv(areq, 0); in crypto_authenc_encrypt_done()
168 authenc_request_complete(areq, err); in crypto_authenc_encrypt_done()
183 int err; in crypto_authenc_encrypt() local
198 err = crypto_skcipher_encrypt(skreq); in crypto_authenc_encrypt()
199 if (err) in crypto_authenc_encrypt()
200 return err; in crypto_authenc_encrypt()
240 static void authenc_verify_ahash_done(void *data, int err) in authenc_verify_ahash_done() argument
244 if (err) in authenc_verify_ahash_done()
247 err = crypto_authenc_decrypt_tail(req, 0); in authenc_verify_ahash_done()
250 authenc_request_complete(req, err); in authenc_verify_ahash_done()
264 int err; in crypto_authenc_decrypt() local
272 err = crypto_ahash_digest(ahreq); in crypto_authenc_decrypt()
273 if (err) in crypto_authenc_decrypt()
274 return err; in crypto_authenc_decrypt()
286 int err; in crypto_authenc_init_tfm() local
293 err = PTR_ERR(enc); in crypto_authenc_init_tfm()
314 return err; in crypto_authenc_init_tfm()
343 int err; in crypto_authenc_create() local
345 err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_AEAD, &mask); in crypto_authenc_create()
346 if (err) in crypto_authenc_create()
347 return err; in crypto_authenc_create()
354 err = crypto_grab_ahash(&ctx->auth, aead_crypto_instance(inst), in crypto_authenc_create()
356 if (err) in crypto_authenc_create()
361 err = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst), in crypto_authenc_create()
363 if (err) in crypto_authenc_create()
369 err = -ENAMETOOLONG; in crypto_authenc_create()
400 err = aead_register_instance(tmpl, inst); in crypto_authenc_create()
401 if (err) { in crypto_authenc_create()
405 return err; in crypto_authenc_create()