]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - crypto/testmgr.c
tua6100: Avoid build warnings.
[mirror_ubuntu-bionic-kernel.git] / crypto / testmgr.c
index 29d7020b8826faa3f0b58897e4d30cd5d9de9d49..53585b93c78b92156335ff40bc204c5becc995e4 100644 (file)
@@ -1767,14 +1767,21 @@ static int alg_test_crc32c(const struct alg_test_desc *desc,
 
        err = alg_test_hash(desc, driver, type, mask);
        if (err)
-               goto out;
+               return err;
 
        tfm = crypto_alloc_shash(driver, type, mask);
        if (IS_ERR(tfm)) {
+               if (PTR_ERR(tfm) == -ENOENT) {
+                       /*
+                        * This crc32c implementation is only available through
+                        * ahash API, not the shash API, so the remaining part
+                        * of the test is not applicable to it.
+                        */
+                       return 0;
+               }
                printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: "
                       "%ld\n", driver, PTR_ERR(tfm));
-               err = PTR_ERR(tfm);
-               goto out;
+               return PTR_ERR(tfm);
        }
 
        do {
@@ -1801,7 +1808,6 @@ static int alg_test_crc32c(const struct alg_test_desc *desc,
 
        crypto_free_shash(tfm);
 
-out:
        return err;
 }
 
@@ -2553,6 +2559,13 @@ static const struct alg_test_desc alg_test_descs[] = {
                                .dec = __VECS(aes_ccm_dec_tv_template)
                        }
                }
+       }, {
+               .alg = "cfb(aes)",
+               .test = alg_test_skcipher,
+               .fips_allowed = 1,
+               .suite = {
+                       .cipher = __VECS(aes_cfb_tv_template)
+               },
        }, {
                .alg = "chacha20",
                .test = alg_test_skcipher,