aboutsummaryrefslogtreecommitdiffstats
path: root/src/db_auc.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-10cosmetic: log IMSI='<imsi>', log "no such subscriber"Neels Hofmeyr1-2/+2
In LOGHLR and LOGAUC, log IMSI='<imsi>' instead of just <imsi>: In the log, it is not always obvious to the reader that the printed number refers to an IMSI (vs. an MSISDN or in the future an IMEI). In db_get_auth_data(), log "No such subscriber" instead of just "Unknown", to clarify what exactly is meant. Change-Id: I2ec8ab5e67d4e95083f6e39232fc91ebaa080cb8
2017-10-10cosmetic: prepend DB_STMT_ to enum stmt_idx entriesNeels Hofmeyr1-2/+2
There are upcoming additions, and some seem too general without a proper common prefix in the identifiers, like 'CREATE'. Change-Id: I51b677db31a1ebbbc45dc7925074de7493fbde1f
2017-03-16debug log: output ind slot, previous sqn, and sqn db updateNeels Hofmeyr1-1/+2
Change-Id: Ib86442ea45f6c1948b3d260f59d35bdca38fbd32
2017-03-16UMTS AKA: implement SQN increment according to SEQ and INDNeels Hofmeyr1-2/+14
Add ind_bitlen column to auc_3g to record each USIM's IND size according to 3GPP TS 33.102 -- default is 5 bits, as suggested by the spec. Introduce auc_3g_ind to each connecting GSUP client to use as IND index for generating auth tuples sent to this client. With osmo_gsup_server_add_conn(), implement a scheme where clients receive fixed auc_3g_ind indexes based on the order in which they connect; each new connection takes the lowest unused auc_3g_ind, so in case one of the clients restarts, it will most likely receive the same auc_3g_ind, and if one client disconnects, no other clients' auc_3g_ind are affected. Add gsup_server_test.c to test the auc_3g_ind index distribution scheme. Depends: libosmocore I4eac5be0c0b2cede04464c4c3a0873102d952453 for llist_first Related: OS#1969 Change-Id: If4501ed4ff8e923fa6fe8b80c44c5ad647a8ed60
2017-03-16fix debug log: adjust to new SQN increment schemeNeels Hofmeyr1-0/+1
We can no longer accurately print the SQN from AUTS resync, since the SQN is incremented after AUTS. Instead, always print the SQN from the generated tuple, i.e. exactly the one left in auth data *after* the tuple was generated. This change was forgotten in recent adjustments to the new SQN incrementing scheme from libosmocore, in change-id I4ec5a578537acb1d9e1ebfe00a72417fc3ca5894 for libosmocore change-id Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3. It should have been obvious that something was missing in the previous patch from the auc_test output: the SQN in the output changed while the AUTN remained the same. That slipped by without being noticed :/ Change-Id: I0e1e828da931a3d22c75306c55bdb7f44df6512f
2016-12-21log: move a log from info to debug levelNeels Hofmeyr1-1/+1
This basically duplicates an info log further below that says "Generated..." Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d
2016-12-11fix various compiler warningsNeels Hofmeyr1-4/+4
Change-Id: I3bf3b351535843bde9c0c1d955315615bb7c30b2
2016-05-05AUC: use osmo_hexparse() when reading key material from dbHarald Welte1-4/+6
The database stores the key material as hex-ascii, we thus need to go through osmo_hexparse() when reading. We could also store the material as BLOB in the database. That would however complicate matters, as it would basically mean using the sqlite3 command to manually inspect/modify data from the console would no longer be easily possible. Using this commit I have 2G authentication working against osmo-sgsn with GSUP and 'auth policy remote'.
2016-05-05AUC: Differentiate between actual error and unknown IMSIHarald Welte1-10/+29
When responding to a SendAuthInfo.req, we need to differentiate an error case caused by an unknown IMSI, or an error caused by an error regarding accessing the database or data integrity.
2016-05-03db_auc: remove some debugging code about column typesHarald Welte1-4/+0
2016-04-28initial import of osmo-gsup-hlr code so farHarald Welte1-0/+208