summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-08-26 22:43:50 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-29 12:46:46 +0000
commit2066a42d5a46c0fe501a6036cb57b7255e955e7d (patch)
treedeb6b994c65b1104739a2a8d50c9ab3e5bb4e298 /utils
parent95500c88b47c228b00ec89b8ffff405ce630c83f (diff)
umts aka: add sqn_ms out-param, print SQN.MS in osmo-auc-gen
When doing UMTS AKA with AUTS, it can be interesting to know the SQN.MS that was encoded in the AUTS. The only way to know this is to provide it as a separate out-parameter from milenage_gen_vec_auts(), because the SQN.MS from AUTS stored in umts.sqn is immediately modified non-trivially by milenage_gen_vec(). Add sqn_ms to struct osmo_sub_auth_data to retain SQN.MS even after a vector was generated. Use this to print out SQN.MS for 'osmo-auc-gen -3 -A'. Adjust test suite expectations. Related: OS#2464 Change-Id: I9fc05bbf169d06716f40b995154fd42a3f91bef3
Diffstat (limited to 'utils')
-rw-r--r--utils/osmo-auc-gen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c
index d4ae1b9e..fee97678 100644
--- a/utils/osmo-auc-gen.c
+++ b/utils/osmo-auc-gen.c
@@ -317,6 +317,8 @@ int main(int argc, char **argv)
if (test_aud.type == OSMO_AUTH_TYPE_UMTS) {
printf("SQN:\t%" PRIu64 "\n", test_aud.u.umts.sqn);
printf("IND:\t%u\n", (unsigned int)(test_aud.u.umts.sqn & ind_mask));
+ if (auts_is_set)
+ printf("SQN.MS:\t%" PRIu64 "\n", test_aud.u.umts.sqn_ms);
}
}