This patch adds an skcipher null object alongside the existing
null blkcipher so that IV generators using it can switch over
to skcipher.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+ ctx->sknull = crypto_get_default_null_skcipher2();
+ err = PTR_ERR(ctx->sknull);
+ if (IS_ERR(ctx->sknull))
+ goto out;
+
ctx->null = crypto_get_default_null_skcipher();
err = PTR_ERR(ctx->null);
if (IS_ERR(ctx->null))
ctx->null = crypto_get_default_null_skcipher();
err = PTR_ERR(ctx->null);
if (IS_ERR(ctx->null))
child = crypto_spawn_aead(aead_instance_ctx(inst));
err = PTR_ERR(child);
child = crypto_spawn_aead(aead_instance_ctx(inst));
err = PTR_ERR(child);
drop_null:
crypto_put_default_null_skcipher();
drop_null:
crypto_put_default_null_skcipher();
+drop_sknull:
+ crypto_put_default_null_skcipher2();
goto out;
}
EXPORT_SYMBOL_GPL(aead_init_geniv);
goto out;
}
EXPORT_SYMBOL_GPL(aead_init_geniv);
crypto_free_aead(ctx->child);
crypto_put_default_null_skcipher();
crypto_free_aead(ctx->child);
crypto_put_default_null_skcipher();
+ crypto_put_default_null_skcipher2();
}
EXPORT_SYMBOL_GPL(aead_exit_geniv);
}
EXPORT_SYMBOL_GPL(aead_exit_geniv);
spinlock_t lock;
struct crypto_aead *child;
struct crypto_blkcipher *null;
spinlock_t lock;
struct crypto_aead *child;
struct crypto_blkcipher *null;
+ struct crypto_skcipher *sknull;
u8 salt[] __attribute__ ((aligned(__alignof__(u32))));
};
u8 salt[] __attribute__ ((aligned(__alignof__(u32))));
};