OSDN Git Service

crypto: remove CRYPTO_TFM_RES_WEAK_KEY
[tomoyo/tomoyo-test1.git] / crypto / des_generic.c
index 6e13a4a..c85354a 100644 (file)
@@ -29,11 +29,8 @@ static int des_setkey(struct crypto_tfm *tfm, const u8 *key,
                else
                        err = 0;
        }
-
-       if (err) {
+       if (err)
                memset(dctx, 0, sizeof(*dctx));
-               crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY);
-       }
        return err;
 }
 
@@ -64,11 +61,8 @@ static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key,
                else
                        err = 0;
        }
-
-       if (err) {
+       if (err)
                memset(dctx, 0, sizeof(*dctx));
-               crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY);
-       }
        return err;
 }