aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2015-03-30 15:56:31 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-03-31 09:21:03 -0400
commit425a882991d9da8bfd2fe0fc495773fab5ac9988 (patch)
tree032a1d8704fcb8484b1e366832cb2dc2cd278755 /crypto
parent06ca7f68d4c861d549a8deb161e1527065a80bb1 (diff)
crypto: testmgr - use CRYPTO_ALG_INTERNAL
Allocate the ciphers irrespectively if they are marked as internal or not. As all ciphers, including the internal ciphers will be processed by the testmgr, it needs to be able to allocate those ciphers. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 1f879adf495a..f9bce3d7ee7f 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1505,7 +1505,7 @@ static int alg_test_aead(const struct alg_test_desc *desc, const char *driver,
1505 struct crypto_aead *tfm; 1505 struct crypto_aead *tfm;
1506 int err = 0; 1506 int err = 0;
1507 1507
1508 tfm = crypto_alloc_aead(driver, type, mask); 1508 tfm = crypto_alloc_aead(driver, type | CRYPTO_ALG_INTERNAL, mask);
1509 if (IS_ERR(tfm)) { 1509 if (IS_ERR(tfm)) {
1510 printk(KERN_ERR "alg: aead: Failed to load transform for %s: " 1510 printk(KERN_ERR "alg: aead: Failed to load transform for %s: "
1511 "%ld\n", driver, PTR_ERR(tfm)); 1511 "%ld\n", driver, PTR_ERR(tfm));
@@ -1534,7 +1534,7 @@ static int alg_test_cipher(const struct alg_test_desc *desc,
1534 struct crypto_cipher *tfm; 1534 struct crypto_cipher *tfm;
1535 int err = 0; 1535 int err = 0;
1536 1536
1537 tfm = crypto_alloc_cipher(driver, type, mask); 1537 tfm = crypto_alloc_cipher(driver, type | CRYPTO_ALG_INTERNAL, mask);
1538 if (IS_ERR(tfm)) { 1538 if (IS_ERR(tfm)) {
1539 printk(KERN_ERR "alg: cipher: Failed to load transform for " 1539 printk(KERN_ERR "alg: cipher: Failed to load transform for "
1540 "%s: %ld\n", driver, PTR_ERR(tfm)); 1540 "%s: %ld\n", driver, PTR_ERR(tfm));
@@ -1563,7 +1563,7 @@ static int alg_test_skcipher(const struct alg_test_desc *desc,
1563 struct crypto_ablkcipher *tfm; 1563 struct crypto_ablkcipher *tfm;
1564 int err = 0; 1564 int err = 0;
1565 1565
1566 tfm = crypto_alloc_ablkcipher(driver, type, mask); 1566 tfm = crypto_alloc_ablkcipher(driver, type | CRYPTO_ALG_INTERNAL, mask);
1567 if (IS_ERR(tfm)) { 1567 if (IS_ERR(tfm)) {
1568 printk(KERN_ERR "alg: skcipher: Failed to load transform for " 1568 printk(KERN_ERR "alg: skcipher: Failed to load transform for "
1569 "%s: %ld\n", driver, PTR_ERR(tfm)); 1569 "%s: %ld\n", driver, PTR_ERR(tfm));
@@ -1636,7 +1636,7 @@ static int alg_test_hash(const struct alg_test_desc *desc, const char *driver,
1636 struct crypto_ahash *tfm; 1636 struct crypto_ahash *tfm;
1637 int err; 1637 int err;
1638 1638
1639 tfm = crypto_alloc_ahash(driver, type, mask); 1639 tfm = crypto_alloc_ahash(driver, type | CRYPTO_ALG_INTERNAL, mask);
1640 if (IS_ERR(tfm)) { 1640 if (IS_ERR(tfm)) {
1641 printk(KERN_ERR "alg: hash: Failed to load transform for %s: " 1641 printk(KERN_ERR "alg: hash: Failed to load transform for %s: "
1642 "%ld\n", driver, PTR_ERR(tfm)); 1642 "%ld\n", driver, PTR_ERR(tfm));
@@ -1664,7 +1664,7 @@ static int alg_test_crc32c(const struct alg_test_desc *desc,
1664 if (err) 1664 if (err)
1665 goto out; 1665 goto out;
1666 1666
1667 tfm = crypto_alloc_shash(driver, type, mask); 1667 tfm = crypto_alloc_shash(driver, type | CRYPTO_ALG_INTERNAL, mask);
1668 if (IS_ERR(tfm)) { 1668 if (IS_ERR(tfm)) {
1669 printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: " 1669 printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: "
1670 "%ld\n", driver, PTR_ERR(tfm)); 1670 "%ld\n", driver, PTR_ERR(tfm));
@@ -1706,7 +1706,7 @@ static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver,
1706 struct crypto_rng *rng; 1706 struct crypto_rng *rng;
1707 int err; 1707 int err;
1708 1708
1709 rng = crypto_alloc_rng(driver, type, mask); 1709 rng = crypto_alloc_rng(driver, type | CRYPTO_ALG_INTERNAL, mask);
1710 if (IS_ERR(rng)) { 1710 if (IS_ERR(rng)) {
1711 printk(KERN_ERR "alg: cprng: Failed to load transform for %s: " 1711 printk(KERN_ERR "alg: cprng: Failed to load transform for %s: "
1712 "%ld\n", driver, PTR_ERR(rng)); 1712 "%ld\n", driver, PTR_ERR(rng));
@@ -1733,7 +1733,7 @@ static int drbg_cavs_test(struct drbg_testvec *test, int pr,
1733 if (!buf) 1733 if (!buf)
1734 return -ENOMEM; 1734 return -ENOMEM;
1735 1735
1736 drng = crypto_alloc_rng(driver, type, mask); 1736 drng = crypto_alloc_rng(driver, type | CRYPTO_ALG_INTERNAL, mask);
1737 if (IS_ERR(drng)) { 1737 if (IS_ERR(drng)) {
1738 printk(KERN_ERR "alg: drbg: could not allocate DRNG handle for " 1738 printk(KERN_ERR "alg: drbg: could not allocate DRNG handle for "
1739 "%s\n", driver); 1739 "%s\n", driver);