projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crypto: null - Remove default null blkcipher
[cascardo/linux.git]
/
crypto
/
crypto_null.c
diff --git
a/crypto/crypto_null.c
b/crypto/crypto_null.c
index
941c9a4
..
20ff2c7
100644
(file)
--- a/
crypto/crypto_null.c
+++ b/
crypto/crypto_null.c
@@
-26,7
+26,7
@@
#include <linux/string.h>
static DEFINE_MUTEX(crypto_default_null_skcipher_lock);
#include <linux/string.h>
static DEFINE_MUTEX(crypto_default_null_skcipher_lock);
-static struct crypto_
bl
kcipher *crypto_default_null_skcipher;
+static struct crypto_
s
kcipher *crypto_default_null_skcipher;
static int crypto_default_null_skcipher_refcnt;
static int null_compress(struct crypto_tfm *tfm, const u8 *src,
static int crypto_default_null_skcipher_refcnt;
static int null_compress(struct crypto_tfm *tfm, const u8 *src,
@@
-153,15
+153,16
@@
MODULE_ALIAS_CRYPTO("compress_null");
MODULE_ALIAS_CRYPTO("digest_null");
MODULE_ALIAS_CRYPTO("cipher_null");
MODULE_ALIAS_CRYPTO("digest_null");
MODULE_ALIAS_CRYPTO("cipher_null");
-struct crypto_
bl
kcipher *crypto_get_default_null_skcipher(void)
+struct crypto_
s
kcipher *crypto_get_default_null_skcipher(void)
{
{
- struct crypto_
bl
kcipher *tfm;
+ struct crypto_
s
kcipher *tfm;
mutex_lock(&crypto_default_null_skcipher_lock);
tfm = crypto_default_null_skcipher;
if (!tfm) {
mutex_lock(&crypto_default_null_skcipher_lock);
tfm = crypto_default_null_skcipher;
if (!tfm) {
- tfm = crypto_alloc_blkcipher("ecb(cipher_null)", 0, 0);
+ tfm = crypto_alloc_skcipher("ecb(cipher_null)",
+ 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(tfm))
goto unlock;
if (IS_ERR(tfm))
goto unlock;
@@
-181,7
+182,7
@@
void crypto_put_default_null_skcipher(void)
{
mutex_lock(&crypto_default_null_skcipher_lock);
if (!--crypto_default_null_skcipher_refcnt) {
{
mutex_lock(&crypto_default_null_skcipher_lock);
if (!--crypto_default_null_skcipher_refcnt) {
- crypto_free_
bl
kcipher(crypto_default_null_skcipher);
+ crypto_free_
s
kcipher(crypto_default_null_skcipher);
crypto_default_null_skcipher = NULL;
}
mutex_unlock(&crypto_default_null_skcipher_lock);
crypto_default_null_skcipher = NULL;
}
mutex_unlock(&crypto_default_null_skcipher_lock);