the resetting of the SEQ/SQN parameters is currently not tested, we
currently only read out the parameters. Lets test resetting as well.
Change-Id: Ie3e386a79f69cd5e35782f593c3a30e1d2b50afb
Related: OS#3376
At the moment we only read the milenage parameters but we do not write
them. Lets extend the unit test so that we test writing as well.
Change-Id: I81dd27b3e65510db931188171093f0e909cde16f
Related: OS#3376
The log output for writing the SQN parameters has changed. Update the
.out file accordingly
Change-Id: I58e7c44d3ff0a1c4fea7b8edaa4ca7326a4fd88a
Related: OS#3376
The use of == with test seems to cause problems when comparing the
return code in line 20. Lets use -eq instead.
Change-Id: I92905770f3a96a632a51858952a82180303d6c05
Related: OS#3376
The concatenation
ALGOS=+"MILENAGE:...
seems to cause problems. Lets replace it with:
ALGOS=$ALGOS"MILENAGE:...
Change-Id: I8d946c47502305be77595cd45a64708d03441dd5
Related OS#3376
We unconditionally display the IMSI but we still lack support for
writing it. Lets support writing the IMSI as well in order to be more
complete.
- Add support for writing the IMSI
Change-Id: I1b3d1e1aae953663c13e78217de2a8ec3282b969
Related: OS#3376
The test 04_algo.sh suggests that an algorithm should also be
identified by its number (this is the old way). Since we upgraded
the commandline interface to accept the names of the algorithms the
support for the old way that used numbers had been removed. However,
we should stay compatible with the old method to keep legacy scripts
of customers working.
- Check if the given parameter that references tha algorithem is
a number. If yes, us it, otherwise lookup the number by the
given string name.
Change-Id: Ib41e4870d05820b6967f648eeeba416113bbc120
Related: OS#3376
When working in an environment with multiple card terminals, then it
might be helpful to make sure that only the intended target simcard
(sysmo-usim-sjs1) is accessed.
- Add atr parameter to the ICC, SIM and USIM classes. When no atr
is given, then ICC will pick any card as it was before
- Make sure to pass the ATR when the sim object is created
Change-Id: I874aae92d29a7e1051e4cebefd85592c5fb78a2e
Related: OS#3376
When using the -T option the user has to supply two authentication
alogorithms. One for 2G and one for 3G. The authentication algorithms
used to be symbolized by integer numbeers. This was later changed so
that the user could use the clear names of the algorithms. Unfortunately
the usage text was not changed.
- Update usage description
Change-Id: I6a47e4fc24f4b3f0664050032cc15d81703f30c5
Collapse two functions of if-cascades into a data structure matching algo
numbers with string names. Use dicts produced from the initial tuple defining
the relation, to re-implement the functions.
When printing out algos, also print out the numbers set on the USIM.
This prepares for printing a list of available algos by commandline switch.
The SQNms offset is a *byte* index into the SQNA file, let's divide
this by 6 before showing it to the user, so he can immediately
make the connection into the SQN array dumped below
The idea of the testsuite is to test all functions of the utility
against one known SIM card that is inserted at the time the test
is executed.
We could insert this card into a reader attached to a
permanently-running machine and then use that as a jenkins build
test slave.
There are quite complete python utilities already out there as part
of Benoit Micuhau's 'card' python library. They support plenty of
SIM, UICC and USIM related bits. Let's use them rather than re-
inventing the wheel here.
the modifications can be found in https://github.com/mitshell/card/pull/2
and I wouuld hope that once Benoit has merged this we can remove the
local copy here and simply rely on pypi pulling it from the repo.
The main program performs ADM1 authentication before using any
of the sysmo_usim_{read,write}* functions, so passing adm1 as
argument to them is just an unused argument that we can remove
If the user submints a wrong ADM1 key with the commandline, the
authentication will fail. However, by the output of the program
it mey not be clear to the user that the reason for the failure
was a wrong ADM1 key. The user might try the same command with
the same parameters a few time and lock down the card.
This commit fixes that by failing gracefully with a very clear
error message. Furthermore, if a decreased authentication counter
is detected, no further authentication attempts will be made
until the user supplies the option -f (--force).
This commit adds a tool that is intended to be used with sysmo-usim
only if some of the highly propritary parameters, which the regular
pysim can not handle, need to be configured.