Commit Graph

5 Commits

Author SHA1 Message Date
Harald Welte f56b1363d9 Support building with -Werror=strict-prototypes / -Werror=old-style-definition
Unfortunately "-std=c99" is not sufficient to make gcc ignore cold that
uses constructs of earlier C standards, which were abandoned in C99.

See https://lwn.net/ml/fedora-devel/Y1kvF35WozzGBpc8@redhat.com/ for
some related discussion.

Change-Id: I84fd99442d0cc400fa562fa33623c142649230e2
2022-11-03 11:15:01 +01:00
Neels Hofmeyr 34907fe6e1 revisit some calls of strtol(), stroul(), strtoull()
Replace some with atoi(), where the VTY has already validated correct
range of the argument.

Replace others with the new osmo_str_to_int() or osmo_str_to_int64()
functions, possibly covering more detection of invalid number strings.

Leave those strtol() callers that depend on endptr to provide the next
string token.

Related: SYS#5542
Change-Id: I0ebb06e751c28f7d1cdf328de29cd227a2449391
2021-10-04 11:24:59 +00:00
Harald Welte 9fb5d80007 osmo-aka-verify: Fix use case with OP and not OPc
Change-Id: Ic6b5da83276ce2618cd80c6d34d3322bad7b4c48
2021-03-22 11:53:23 +01:00
Vadim Yanitskiy c3c914a5df utils/osmo-aka-verify: fix swapped CK/IK arguments
The positions of arguments in the call to "milenage_check" do not
match the ordering of the parameters:

  * "ck" is passed to "ik"
  * "ik" is passed to "ck"

Let's simply reorder the arguments of milenage_check()
to match the ordering in milenage_f2345().

Change-Id: Ia003d3c9d88fb8f6740791583855a709b8639160
Fixes: CID#220324
2021-03-21 22:36:43 +01:00
Harald Welte 8602106224 utils: osmo-aka-verify to verify UMTS AKA (SIM side)
This new utility implements the UMTS AKA procedures of the SIM
side.  It can be used to manually verify the correctness of
authentication tuples received from the network.

Change-Id: I497747fbf09f633dcd7c592bd9af7fca9a820645
2021-03-20 11:00:27 +00:00