diff options
| author | Namjae Jeon <[email protected]> | 2021-05-26 15:25:40 +0900 |
|---|---|---|
| committer | Namjae Jeon <[email protected]> | 2021-05-26 18:11:53 +0900 |
| commit | 94096702376ecb99c86cbee9dd95fc3675231b8a (patch) | |
| tree | 8d4075b6399329af9e15ca57f62b8e026b945eb6 | |
| parent | 8bae4419ce636f6f8414193a206a2dc2e6dd37db (diff) | |
cifsd: move fips_enabled check before the str_to_key()
Move fips_enabled check before the str_to_key().
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
| -rw-r--r-- | fs/cifsd/auth.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cifsd/auth.c b/fs/cifsd/auth.c index 6b90aac86fcc..9263c9ce2dd2 100644 --- a/fs/cifsd/auth.c +++ b/fs/cifsd/auth.c @@ -92,14 +92,13 @@ smbhash(unsigned char *out, const unsigned char *in, unsigned char *key) unsigned char key2[8]; struct des_ctx ctx; - str_to_key(key, key2); - if (fips_enabled) { ksmbd_debug(AUTH, "FIPS compliance enabled: DES not permitted\n"); return -ENOENT; } + str_to_key(key, key2); des_expand_key(&ctx, key2, DES_KEY_SIZE); des_encrypt(&ctx, out, in); memzero_explicit(&ctx, sizeof(ctx)); |