summaryrefslogtreecommitdiffstats
path: root/tests/auth
Commit message (Collapse)AuthorAgeFilesLines
* milenage_test: cosmetic: verify AUTS in commentsNeels Hofmeyr2017-03-151-0/+56
| | | | | | | | In a comment and by code #if'd away, illustrate that the AUTS used in the unit test is accurate. Related: OS#1968 Change-Id: Iefeaaf33570f8e40245fdf9b810390ec61cfc7e0
* milenage_test: enhance to verify new SQN incrementsNeels Hofmeyr2017-03-152-0/+31
| | | | | | | | | After the legacy mode incrementing with ind_bitlen == 0 is through, do another AUTS run with sensible ind_bitlen and ind, and then two more normal vector generations to verify proper SQN increments. Related: OS#1968 Change-Id: Id6947899ff7b1c82b939f969e163e51ce282bce2
* osmo_auth_gen_vec: UMTS auth: fix SQN as SEQ || INDNeels Hofmeyr2017-03-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | So far we incremented SQN by 1, which doesn't match the procedures described in 3GPP TS 33.102. An IND (index) denotes a non-significant part of SQN, and the significant SEQ part needs to be incremented. In OsmoHLR we furthermore want to use the "exception" suggested in annex C.3.4, so that each HLR's client has a fixed IND index. In other words, we will not assign IND cyclically, but keep IND unchanged per auth vector consumer. Add 'ind_bitlen' and 'ind' to the osmo_sub_auth_data.u.umts structure and increment SQN accordingly. Add a comment explaining the details. Because 'ind_bitlen' is still passed as zero, the milenage_test does not change its behavior, which is a feature I want to clearly show in this patch. The test will be expanded for the newly implemented SQN scheme in a subsequent patch. Adjust osmo-auc-gen.c to still show the right SQN and SQN.MS -- because it is passing ind_bitlen == 0, osmo-auc-gen can rely on single increments and know SQN.MS is sqn - 1. Note that osmo-auc-gen_test output remains unchanged. Related: OS#1968 Change-Id: Ibc97e1736a797ffcbf8c1f7d41c5c4518f4e41bf
* osmo_auth_gen_vec: UMTS auth: store last used SQN, not nextNeels Hofmeyr2017-03-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for the implementation of splitting SQN increments in SEQ and an IND part; particularly to clearly show where the changes in auth/milenage_test's expectations originate. Rationale: the source of UMTS auth vectors, for us usually OsmoHLR, typically stores the last used SQN, not the next one to be used. Particularly with the upcoming fix of the SQN scheme, this change is important: the next SQN will depend on which entity asks for it, because each auth consumer may have a particular slot in the IND part of SQN. It does not make sense to store the next SQN, because we will not know which consumer that will be for. The milenage_test has always calculated a tuple for SQN == 34. To account for the increment now happening before calculating a tuple, lower the test_aud->sqn by one to 0x21 == 33, so that it is still calculating for SQN == 34. Because we are no longer incrementing SQN after the tuple is generated, milenage_test's expected output after doing an AUTS resync to 31 changes to the next SQN = 32, the SQN used for the generated tuple. (BTW, a subsequent patch will illustrate AUTS in detail.) osmo-auc-gen now needs to pass the user requested SQN less one, because the SQN will be incremented befor generating the auth vector. Also the SQN remains the same after generating, so SQN output needs less decrementing. Note that the expected output for osmo-auc-gen_test remains unchanged, hence the same input arguments (particularly -s <sqn> and -A <auts>) still produce the same results. Note: osmo-hlr regression tests will require adjustments when this patch is merged, because it must now pass desired_sqn - 1 instead of just desired_sqn. See osmo-hlr change-id I4ec5a578537acb1d9e1ebfe00a72417fc3ca5894 . Related: OS#1968 Change-Id: Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3
* milenage_test: cosmetic fix: shown value is not SEQ.MSNeels Hofmeyr2017-03-152-2/+4
| | | | | | | | | | | | | | | In the milenage_test, the console output printed "SEQ.MS = 33", but 33 is a) the SQN, not SEQ; b) the SQN *after* the next auth generation, i.e. SQN.MS would have been 31. While at it also use the proper PRIu64 from inttypes.h to output the sqn value. This prepares for upcoming sparation of SQN incrementing by SEQ and IND, particularly to clearly show where the changes in auth/milenage_test's expectations originate. Related: OS#1968 Change-Id: Ie83201f1362f3d793ada774f3fc5f89cc0b3fbb7
* tests: test actual support status for auth. algoMax2016-06-292-0/+4
| | | | | | | Check if library actually support Milenage, COMP128 v2 and v3 algorithms instead of just printing enum values or nothing. Change-Id: I2b98481f56a8381058d4b29db5e8a36eb193eee9
* tests: Fix warningsJacob Erlbeck2013-10-081-1/+3
| | | | | | This fixes warnings that are raised by missing includes, missing casts, missing return statements, using printf %lu with uint64_t, and unused symbols.
* build: simplify test handling and speed up build.Diego Elio Pettenò2012-06-301-8/+0
| | | | | | | | | | | | Instead of using a ./configure parameter to decide whehter to build tests or not, use the check_PROGRAMS variable so that the tests are only built when running `make check`. To avoid slowing down the test phase itself, collapse the declaration of the test targets in the tests/Makefile.am file, this way they can be built and linked in parallel before the testsuite is executed. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
* auth: Update test result with the new OP/OPC outputHolger Hans Peter Freyther2012-03-211-0/+2
|
* milenage: Add function to compute OPC from OP and KHarald Welte2012-03-211-0/+20
|
* auth_core: don't use anonymous unions to make certain gcc versions happyHarald Welte2011-12-071-2/+2
|
* milenage_test: make sure test output is what .ok file expectsHarald Welte2011-12-071-1/+1
|
* milenage_test: make sure test result matches expectationsHarald Welte2011-12-071-1/+1
|
* whitespace fixes in milenage_test.okHarald Welte2011-12-071-7/+7
|
* add autotest script for milenage/auth testingHarald Welte2011-12-073-0/+94