diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-08-26 21:38:51 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-08-29 12:46:45 +0000 |
commit | b1af6ef1646c54f429f7b87778d92d139c0e3336 (patch) | |
tree | 6372e127c98864b4f7f70ab63d3a98357ae0f856 /tests/osmo-auc-gen | |
parent | 3cb08277f1d46c6c74c4bb6e254a57ffb9ac3834 (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')
-rw-r--r-- | tests/osmo-auc-gen/osmo-auc-gen_test.err | 3 | ||||
-rw-r--r-- | tests/osmo-auc-gen/osmo-auc-gen_test.ok | 77 | ||||
-rwxr-xr-x | tests/osmo-auc-gen/osmo-auc-gen_test.sh | 8 |
3 files changed, 88 insertions, 0 deletions
diff --git a/tests/osmo-auc-gen/osmo-auc-gen_test.err b/tests/osmo-auc-gen/osmo-auc-gen_test.err index 46ecf2ef..d9b54850 100644 --- a/tests/osmo-auc-gen/osmo-auc-gen_test.err +++ b/tests/osmo-auc-gen/osmo-auc-gen_test.err @@ -7,3 +7,6 @@ Requested --ind 32 is too large for IND bitlen of 5 expecting error: > osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind 42 Requested --ind 42 is too large for IND bitlen of 5 +expecting error: +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 0 --ind 1 +Requested --ind 1 is too large for IND bitlen of 0 diff --git a/tests/osmo-auc-gen/osmo-auc-gen_test.ok b/tests/osmo-auc-gen/osmo-auc-gen_test.ok index 278c88f4..f833760d 100644 --- a/tests/osmo-auc-gen/osmo-auc-gen_test.ok +++ b/tests/osmo-auc-gen/osmo-auc-gen_test.ok @@ -140,6 +140,76 @@ Kc: 059a4f668f6fbe39 SQN: 63 +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 0 +osmo-auc-gen (C) 2011-2012 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +RAND: 39fa2f4e3d523d8619a73b4f65c3e14d +AUTN: 8704f5ba55eb0000d7fc4f7f19cfc180 +IK: 27497388b6cb044648f396aa155b95ef +CK: f64735036e5871319c679f4742a75ea1 +RES: e229c19e791f2e41 +SRES: 9b36efdf +Kc: 059a4f668f6fbe39 +SQN: 24 + + +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 1 +osmo-auc-gen (C) 2011-2012 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +RAND: 39fa2f4e3d523d8619a73b4f65c3e14d +AUTN: 8704f5ba55eb0000d7fc4f7f19cfc180 +IK: 27497388b6cb044648f396aa155b95ef +CK: f64735036e5871319c679f4742a75ea1 +RES: e229c19e791f2e41 +SRES: 9b36efdf +Kc: 059a4f668f6fbe39 +SQN: 24 + + +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 1 --ind 1 +osmo-auc-gen (C) 2011-2012 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +RAND: 39fa2f4e3d523d8619a73b4f65c3e14d +AUTN: 8704f5ba55ea0000aab06de3fd6c01af +IK: 27497388b6cb044648f396aa155b95ef +CK: f64735036e5871319c679f4742a75ea1 +RES: e229c19e791f2e41 +SRES: 9b36efdf +Kc: 059a4f668f6fbe39 +SQN: 25 + + +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 8 +osmo-auc-gen (C) 2011-2012 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +RAND: 39fa2f4e3d523d8619a73b4f65c3e14d +AUTN: 8704f5ba54f30000cbba2fbba3c5e242 +IK: 27497388b6cb044648f396aa155b95ef +CK: f64735036e5871319c679f4742a75ea1 +RES: e229c19e791f2e41 +SRES: 9b36efdf +Kc: 059a4f668f6fbe39 +SQN: 256 + + +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 8 --ind 1 +osmo-auc-gen (C) 2011-2012 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +RAND: 39fa2f4e3d523d8619a73b4f65c3e14d +AUTN: 8704f5ba54f200008f8e14579da5ecbb +IK: 27497388b6cb044648f396aa155b95ef +CK: f64735036e5871319c679f4742a75ea1 +RES: e229c19e791f2e41 +SRES: 9b36efdf +Kc: 059a4f668f6fbe39 +SQN: 257 + + expecting error: > osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind -1 osmo-auc-gen (C) 2011-2012 by Harald Welte @@ -159,3 +229,10 @@ expecting error: osmo-auc-gen (C) 2011-2012 by Harald Welte This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + + +expecting error: +> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 0 --ind 1 +osmo-auc-gen (C) 2011-2012 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + 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 |