summaryrefslogtreecommitdiffstats
path: root/src/modules/rlm_mschap/rlm_mschap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/rlm_mschap/rlm_mschap.c')
-rw-r--r--src/modules/rlm_mschap/rlm_mschap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/rlm_mschap/rlm_mschap.c b/src/modules/rlm_mschap/rlm_mschap.c
index 00ab90d..4742f9f 100644
--- a/src/modules/rlm_mschap/rlm_mschap.c
+++ b/src/modules/rlm_mschap/rlm_mschap.c
@@ -1013,16 +1013,16 @@ ntlm_auth_err:
return -1;
}
- if (!EVP_CIPHER_CTX_set_key_length(ctx, nt_password->vp_length)) {
- REDEBUG("Failed setting key length");
- goto error;
- }
-
if (!EVP_EncryptInit_ex(ctx, EVP_rc4(), NULL, nt_password->vp_octets, NULL)) {
REDEBUG("Failed setting key value");
goto error;;
}
+ if (!EVP_CIPHER_CTX_set_key_length(ctx, nt_password->vp_length)) {
+ REDEBUG("Failed setting key length");
+ goto error;
+ }
+
if (!EVP_EncryptUpdate(ctx, nt_pass_decrypted, &ntlen, new_nt_password, ntlen)) {
REDEBUG("Failed getting output");
goto error;