mirror of
https://github.com/torvalds/linux
synced 2024-10-15 15:59:15 +00:00
crypto: aead - Remove blkcipher null for IV generators
The blkcipher null object is no longer used and can now be removed. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
ef22871f20
commit
da721302a7
|
@ -299,11 +299,6 @@ int aead_init_geniv(struct crypto_aead *aead)
|
||||||
if (IS_ERR(ctx->sknull))
|
if (IS_ERR(ctx->sknull))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ctx->null = crypto_get_default_null_skcipher();
|
|
||||||
err = PTR_ERR(ctx->null);
|
|
||||||
if (IS_ERR(ctx->null))
|
|
||||||
goto drop_sknull;
|
|
||||||
|
|
||||||
child = crypto_spawn_aead(aead_instance_ctx(inst));
|
child = crypto_spawn_aead(aead_instance_ctx(inst));
|
||||||
err = PTR_ERR(child);
|
err = PTR_ERR(child);
|
||||||
if (IS_ERR(child))
|
if (IS_ERR(child))
|
||||||
|
@ -319,8 +314,6 @@ int aead_init_geniv(struct crypto_aead *aead)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
drop_null:
|
drop_null:
|
||||||
crypto_put_default_null_skcipher();
|
|
||||||
drop_sknull:
|
|
||||||
crypto_put_default_null_skcipher2();
|
crypto_put_default_null_skcipher2();
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -331,7 +324,6 @@ void aead_exit_geniv(struct crypto_aead *tfm)
|
||||||
struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm);
|
struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm);
|
||||||
|
|
||||||
crypto_free_aead(ctx->child);
|
crypto_free_aead(ctx->child);
|
||||||
crypto_put_default_null_skcipher();
|
|
||||||
crypto_put_default_null_skcipher2();
|
crypto_put_default_null_skcipher2();
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(aead_exit_geniv);
|
EXPORT_SYMBOL_GPL(aead_exit_geniv);
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
struct aead_geniv_ctx {
|
struct aead_geniv_ctx {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
struct crypto_aead *child;
|
struct crypto_aead *child;
|
||||||
struct crypto_blkcipher *null;
|
|
||||||
struct crypto_skcipher *sknull;
|
struct crypto_skcipher *sknull;
|
||||||
u8 salt[] __attribute__ ((aligned(__alignof__(u32))));
|
u8 salt[] __attribute__ ((aligned(__alignof__(u32))));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue