libosmocore/tests
Neels Hofmeyr 82c9a0ec19 osmo_auth_gen_vec: UMTS auth: store last used SQN, not next
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
2017-03-15 12:46:08 +00:00
..
a5 fix compiler warnings for a5 tests 2015-04-07 20:08:38 +02:00
auth osmo_auth_gen_vec: UMTS auth: store last used SQN, not next 2017-03-15 12:46:08 +00:00
bits bitcomp: Remove the t4 decoding from libosmocore 2016-11-10 17:07:45 +00:00
bitvec Add function to get uninterrupted bit run 2017-01-06 10:37:42 +00:00
codec DTX: fix AMR SID-FIRST detection 2017-01-10 23:28:12 +00:00
coding libosmocoding: migrate transcoding routines from OsmoBTS 2017-03-07 01:06:38 +07:00
comp128 tests: test actual support status for auth. algo 2016-06-29 16:33:40 +00:00
conv tests/conv: separate test logic 2017-03-06 17:06:45 +00:00
ctrl Use value_string for ctrl_type 2017-03-01 16:37:59 +00:00
fr fr_test: Speculative build fix for FreeBSD 2013-01-15 21:18:02 +01:00
fsm fsm_test.c: fix compiler warning: timer cb return type 2016-12-24 17:11:52 +00:00
gb bssgp_fc_test: do not use real time 2017-02-07 00:39:54 +00:00
gea Add GEA3 & GEA4 ciphers 2016-07-11 19:15:24 +00:00
gprs gsm: Add APN conversion functions 2016-01-15 14:46:19 +01:00
gsm0408 gsm0408_test: initialize msgb talloc ctx 2016-09-27 11:46:38 +02:00
gsm0808 test: Fix compiler warnings on 64bit systems 2015-11-09 16:46:03 +00:00
gsup gsup_test: also check stderr 2017-02-22 07:29:46 +00:00
kasumi kasumi: Fix build with gcc5 that changed behavior of inline 2016-01-21 15:50:04 +01:00
lapd lapd_test: avoid calling memcpy with NULL source 2017-01-06 10:03:30 +00:00
logging fix logging: log_set_category_filter() for internal DL* logging cats 2016-12-12 16:56:54 +01:00
loggingrb logginrb: Fix compiler warning about fprintf 2015-04-11 19:33:10 +02:00
msgb Fix msgb_test on 64 bit architectures 2016-12-09 17:59:58 +01:00
msgfile build: resolve compiler warning about implicit delcaration 2014-10-04 11:49:23 +02:00
oap GSUP, OAP, osmo-gen-vec: fix AUTS length to 14, not 16 2017-02-02 20:34:16 +01:00
osmo-auc-gen osmo-auc-gen: clarify SQN output, prepare for SQN changes 2017-03-15 12:46:08 +00:00
sim sim: Fix compiler warning and by this fixing the test result 2016-03-21 11:29:16 +01:00
sms test: Fix compiler warnings on 64bit systems 2015-11-09 16:46:03 +00:00
smscb test: Fix compiler warnings on 64bit systems 2015-11-09 16:46:03 +00:00
socket cosmetic: replace fprintf with LOGP 2017-02-09 16:21:01 +01:00
stats stats_test: fix mismatching osmo_stats_reporter->send_item signature 2017-01-15 18:10:15 +00:00
strrb utils: Introduce OSMO_ASSERT in the utils and use it in the unit tests 2013-03-09 23:52:29 +01:00
timer timer_test: set 8 as default steps, use the default in testsuite.at 2016-09-22 07:18:39 +02:00
tlv tlv: Import osmo_shift_* and osmo_match_shift_* from openbsc 2016-05-05 18:49:27 +02:00
ussd ussd: Decode interrogateSS that doesn't have test 2016-07-12 17:45:34 +02:00
utils osmo_hexparse: allow whitespace in parsed string, add ws test 2017-02-14 15:59:22 +01:00
vty stats/test: Add tests to check VTY configuration 2015-08-22 01:34:05 +00:00
write_queue wqueue: Reject messges if queue is considered full 2016-12-09 11:37:37 +01:00
Makefile.am add osmo-auc-gen_test 2017-03-15 12:46:08 +00:00
atlocal.in build: make check: disable sim_test when built with --disable-pcsc 2016-11-16 16:40:44 +00:00
testsuite.at add osmo-auc-gen_test 2017-03-15 12:46:08 +00:00