Reply-Message := 'foo'
-if (%dict.attr.by_num(1) != 'User-Name') {
+if (%dict.attr.by_num('1') != 'User-Name') {
test_fail
}
-if (%dict.attr.by_oid(1) != 'User-Name') {
+if (%dict.attr.by_oid('1') != 'User-Name') {
test_fail
}
# Should fail
-if (%dict.attr.by_oid(26) != 'Vendor-Specific') {
+if (%dict.attr.by_oid('26') != 'Vendor-Specific') {
test_fail
}
# Should fail
-if (%dict.attr.by_oid(26.11344) != 'FreeRADIUS') {
+if (%dict.attr.by_oid('26.11344') != 'FreeRADIUS') {
test_fail
}
-if (%dict.attr.by_oid(26.11344.1) != 'Proxied-To') {
+if (%dict.attr.by_oid('26.11344.1') != 'Proxied-To') {
test_fail
}
string test_string
string result_string
-if (%aka_sim_id_method("%{User-Name}") != 'AKA') {
+if (%aka_sim_id_method(%{User-Name}) != 'AKA') {
test_fail
}
-if (%aka_sim_id_type("%{User-Name}") != 'permanent') {
+if (%aka_sim_id_type(%{User-Name}) != 'permanent') {
test_fail
}
#
# 0.2 - Can we get the EAP method from the encrypted blob correctly?
#
-if (%aka_sim_id_method("%{control.User-Name}") != 'AKA') {
+if (%aka_sim_id_method(%{control.User-Name}) != 'AKA') {
test_fail
}
#
# 0.3 - Can we identify the encrypted blob correctly?
#
-if (%aka_sim_id_type("%{control.User-Name}") != 'pseudonym') {
+if (%aka_sim_id_type(%{control.User-Name}) != 'pseudonym') {
test_fail
}
#
# 0.4 - We should refuse to re-encrypt an encrypted NAI
#
-if ("%3gpp_temporary_id_encrypt(%{control.User-Name},%{test_string},6)" != '') {
+if (%3gpp_temporary_id_encrypt(%{control.User-Name}, %{test_string}, 6) != '') {
test_fail
}
#
if (User-Name =~ /^[0-9](.*)/) {
request += {
- User-Name = "%{1}"
+ User-Name = %{1}
EAP-Type = ::AKA
}
}
#
test_string := '1420032219455259'
control += {
- User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]},%{test_string},6)
+ User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]}, %{test_string}, 6)
}
#
# 1.2 - Can we identify the encrypted blob correctly?
#
-if (%aka_sim_id_type("%{control.User-Name[1]}") != 'pseudonym') {
+if (%aka_sim_id_type(%{control.User-Name[1]}) != 'pseudonym') {
test_fail
}
#
# 1.3 - We should refuse to re-encrypt an encrypted NAI
#
-if ("%3gpp_temporary_id_encrypt(%{control.User-Name[1]},%{test_string},6)" != '') {
+if (%3gpp_temporary_id_encrypt(%{control.User-Name[1]},%{test_string},6) != '') {
test_fail
}
#
test_string := '1420032219455259'
control += {
- User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]},%{test_string},6,fastauth)
+ User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]},%{test_string},6,'fastauth')
}
#
# 2.2 - Can we identify the encrypted blob correctly?
#
-if (%aka_sim_id_type("%{control.User-Name[2]}") != 'fastauth') {
+if (%aka_sim_id_type(%{control.User-Name[2]}) != 'fastauth') {
test_fail
}
#
# 2.3 - We should refuse to re-encrypt an encrypted NAI
#
-if ("%3gpp_temporary_id_encrypt(%{control.User-Name[2]},%{test_string},6,fastauth)" != '') {
+if (%3gpp_temporary_id_encrypt(%{control.User-Name[2]}, %{test_string}, 6, 'fastauth') != '') {
test_fail
}
#
# 2.4 - Get the original IMSI back again
#
-result_string := %3gpp_temporary_id_decrypt(%{control.User-Name[2]},%{test_string})
+result_string := %3gpp_temporary_id_decrypt(%{control.User-Name[2]}, %{test_string})
if (result_string != "0%{User-Name[1]}") {
test_fail
test_fail {
reply += {
- Reply-Message = "Failure in test at line %interpreter(...line)"
+ Reply-Message = "Failure in test at line %interpreter('...line')"
}
reject
}
# Outputs the contents of the control list in debugging (-X) mode
#
debug_control {
- if("%debug_attr(control)" == '') {
+ if("%debug_attr('control')" == '') {
noop
}
}
# Outputs the contents of the request list in debugging (-X) mode
#
debug_request {
- if("%debug_attr(request)" == '') {
+ if("%debug_attr('request')" == '') {
noop
}
}
# Outputs the contents of the reply list in debugging (-X) mode
#
debug_reply {
- if("%debug_attr(reply)" == '') {
+ if("%debug_attr('reply')" == '') {
noop
}
}
# Outputs the contents of the session state list in debugging (-X) mode
#
debug_session_state {
- if("%debug_attr(session-state)" == '') {
+ if("%debug_attr('session-state')" == '') {
noop
}
}