summaryrefslogtreecommitdiffstats
path: root/tests/osmo-auc-gen/osmo-auc-gen_test.sh
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-08-26 21:38:51 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-29 12:46:45 +0000
commitb1af6ef1646c54f429f7b87778d92d139c0e3336 (patch)
tree6372e127c98864b4f7f70ab63d3a98357ae0f856 /tests/osmo-auc-gen/osmo-auc-gen_test.sh
parent3cb08277f1d46c6c74c4bb6e254a57ffb9ac3834 (diff)
osmo-auc-gen: umts: add --ind-len arg
osmo-auc-gen so far does not allow indicating the IND bit length of SQN. A default of 5 serves most practical cases, nevertheless we should allow passing arbitrary IND lengths. Enhance the test suite to test --ind-len. Related: OS#2465 Change-Id: Ia1d8b6a823ffc92290b3e39e4e4665aeff80ccc0
Diffstat (limited to 'tests/osmo-auc-gen/osmo-auc-gen_test.sh')
-rwxr-xr-xtests/osmo-auc-gen/osmo-auc-gen_test.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/osmo-auc-gen/osmo-auc-gen_test.sh b/tests/osmo-auc-gen/osmo-auc-gen_test.sh
index f7fc87da..55b0757a 100755
--- a/tests/osmo-auc-gen/osmo-auc-gen_test.sh
+++ b/tests/osmo-auc-gen/osmo-auc-gen_test.sh
@@ -48,7 +48,15 @@ invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind 5
invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind 23
invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind 31
+invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind-len 0
+invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind-len 1
+invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind-len 1 --ind 1
+invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind-len 8
+invoke -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind-len 8 --ind 1
+
# expect error: IND is too large for IND-bitlen of 5 (max 31)
invoke_err -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind -1
invoke_err -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind 32
invoke_err -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind 42
+
+invoke_err -3 -a milenage -r $rand -k $k -o $opc -A $auts --ind-len 0 --ind 1