aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auc/auc_3g_test.c
AgeCommit message (Collapse)AuthorFilesLines
2017-02-22cosmetic: rename auc_3g_test.c to auc_test.cNeels Hofmeyr1-627/+0
The test includes 2G-only tests so the name is misleading. Splitting up makes no sense. Change-Id: I1a5a40413bf6636ead9370fb827aa0338c049e7f
2017-02-22cosmetic: auc_3g_test: improve test debugging toolsNeels Hofmeyr1-5/+66
In the test failure mismatch printf, better indicate the place of first mismatch. Helpful if some byte within a hexdump differs, the case when debugging AUTS. Copy some optarg code from openbsc's msc_vlr tests to provide verbose mode that prints log statements' source file and line. Change-Id: I1b23da055b5edacba09310411caf43c4cd1c29bc
2017-02-22auc_compute_vectors(): fix AUTS resync for multiple vectorsNeels Hofmeyr1-45/+1
Fix bug where AUTS was fed to each vector generation and thus each vector was generated with the same SQN. In auc_3g_test, adjust the bug indicating test expectations to now expect the proper results. Depends: libosmocore change-id If943731a78089f0aac3d55245de80596d01314a4 Change-Id: I425a1d92c85896227341f565f5361c0d830ce866
2017-02-22cosmetic: refactor auc_compute_vectors(), add debug logNeels Hofmeyr1-2/+2
Make the generation logic easier to understand (hopefully). Massively extend debug logging, which serves to illustrate the current AUTS failure shown by auc_3g_test. Since DAUC now logs the vectors, there is no need to print the vectors in VEC_IS() in auc_3g_test and auc_ts_55_205_test_sets anymore. Adjust testlog expectations accordingly. Change-Id: Ifb36d010a4ac64c765517e15b9074424ec19cc60
2017-02-22auc_3g_test: add AUTS test with N vectors, to show bugNeels Hofmeyr1-0/+112
Add test that shows how passing AUTS to auc_compute_vectors performs an AUTS sync on each vector and hence produces the same SQN each time. This will generate one working vector as resync result, and then N-1 more with the wrong SQN as far as the USIM is concerned. This causes a resync to be necessary on every authentication. Depends: libosmocore change-id If943731a78089f0aac3d55245de80596d01314a4 Change-Id: I246c9edfb009b593f834bb5b0577b65bfde7083c
2017-02-22auc_3g_test: allow to inc fake rand bytes upon rand requestNeels Hofmeyr1-10/+16
Preparing for upcoming unit test, in a separate commit for cosmetic reasons (setting the flag to false across the code). Change-Id: I6b9899cd898eecc95b244432f416041b194a7187
2017-02-22auc_gen_vectors(): ensure sane arguments, testNeels Hofmeyr1-0/+98
In auc_gen_vectors(), add various checks that the auth data arguments passed make sense, and add unit test to verify that they work. (Caught a segfault due to NULL dereference with this.) Change-Id: I775652b6a91d382707ce32176a3fe4ef547cbca7
2017-02-22auc_3g_test: add AUTS resync testNeels Hofmeyr1-0/+70
Used this to catch a bug where the AUTS process failed to copy RAND to the auth vector (libosmocore). Depends: libosmocore change-id If943731a78089f0aac3d55245de80596d01314a4 Change-Id: I06dd8671aa515139bdc3f08883f08276662cf25f
2017-02-01auth: verify test sets from 3GPP TS 55.205Neels Hofmeyr1-14/+15
Put to-text conversion of the 3GPP TS 55.205 PDF's section defining the test vectors in tests/auc/gen_ts_55_205_test_sets/ts55_205_test_sets.txt and add python script to generate auc_ts_55_205_test_sets.c from that at build time. The generated auc_ts_55_205_test_sets.c runs through all 19 test sets, verifying that our gsm_milenage() matches the reference data. Change-Id: Idff9d757ab956179aa41ada2a223fd9f439aafbd
2017-02-01tests: auc_3g_test: implement vector generation testNeels Hofmeyr1-1/+263
Change-Id: I291bccd62661ff5790dc43d91dc63a9e4b0e0ff2
2017-02-01Add test suite skeleton with empty test (auc_3g_test)Neels Hofmeyr1-0/+61
Change-Id: I6359b0809ce8578850fd65887a568714fb35dbd8