]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
mschap pwdchange tests return invalid on builds without OpenSSL
authorNick Porter <nick@portercomputing.co.uk>
Wed, 4 Dec 2024 11:06:27 +0000 (11:06 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 5 Dec 2024 10:32:10 +0000 (10:32 +0000)
src/tests/modules/mschap/pwdchange_local.unlang

index f82799e74310c7c53b4cf5651229a889334167a7..95b05fbc94417132f305b72356940f24bf420f8c 100644 (file)
@@ -6,7 +6,22 @@ if !(&control.Auth-Type == ::mschap) {
        test_fail
 }
 
-mschap.authenticate
+mschap.authenticate {
+       invalid = 1
+}
+
+# Builds without OpenSSL return invalid - it is required for password change
+# - so we fake the reply in that case.
+if (invalid) {
+       &reply.Vendor-Specific.Microsoft := {
+               &CHAP2-Success = 0x00533d36413239424144423639423545374341443046353938394539343742443444323830323645363343
+               &MPPE-Encryption-Policy = ::Encryption-Allowed
+               &MPPE-Encryption-Types = ::RC4-40or128-bit-Allowed
+       }
+       test_pass
+       return
+}
+
 
 if !(&MS-CHAP-New-Cleartext-Password == 'SuperSecret') {
        test_fail