Commit Graph

17 Commits

Author SHA1 Message Date
Ludovic Rousseau 50579f1ae7 Fix pycodestyle issues
osmo-sim-auth.py:45:12: E711 comparison to None should be 'if cond is None:'
osmo-sim-auth.py:131:20: E712 comparison to True should be 'if cond is True:' or 'if cond:'

Change-Id: I959ea84b8369a0a37bb65c47824a4c4e8d4630cc
2020-10-28 17:24:57 +00:00
Ludovic Rousseau 275e4c1b59 osmo-sim-auth: support Python 3
Use byteToHex() so the same code works for Python 2 and Python 3.

Change-Id: Ib5602eb1b6406731757d39a77eb4c7103cfba846
2020-10-28 17:24:35 +00:00
Ludovic Rousseau f85c4ee51b osmo-sim-auth.py:45:9: E113 unexpected indentation
Change-Id: I0d7d34ea03f267bafc0da173c48440626e03d58b
2020-10-25 14:35:34 +01:00
Ludovic Rousseau 003aff3efe osmo-sim-auth.py:67:6: E225 missing whitespace around operator
Change-Id: I63e6c90ab8ba7217933d42756630b809653505df
2020-10-25 14:35:34 +01:00
Ludovic Rousseau 58678c7336 osmo-sim-auth.py:38:18: E703 statement ends with a semicolon
Change-Id: If562fd4148c037f3c5087ebd2ae9f464e6bfe67e
2020-10-25 14:35:33 +01:00
Ludovic Rousseau d4053c3c7e Use 2 blank lines when needed
$ pycodestyle osmo-sim-auth.py
osmo-sim-auth.py:30:1: E302 expected 2 blank lines, found 1

Change-Id: Ic1e902b2c112b9b485a090a591db7cdbabea77f4
2020-10-25 14:35:32 +01:00
Ludovic Rousseau 9c88668669 Replace tabs by spaces
± pycodestyle osmo-sim-auth.py
osmo-sim-auth.py:31:1: W191 indentation contains tabs
osmo-sim-auth.py:32:1: W191 indentation contains tabs
[...]

Change-Id: Id026fcd3975113a8bec2e30c58ac7b521ec1707f
2020-10-25 14:35:31 +01:00
Ludovic Rousseau fce0bfdae1 Convert to Python3 using 2to3
Change-Id: I70a95fec06a18ff6ebedcc1b6c48a16304047770
2020-10-25 14:35:30 +01:00
Ludovic Rousseau e2ad26b0e8 README.md: fix typo
Change-Id: Ibfee59f9ef2e8411dd8d45f9b7fd20022ff9b2cb
2020-10-25 14:35:27 +01:00
Philipp Maier 00534312cb Check return code of u.authenticate()
The method authenticate() of the class USIM may return None in some
error cases. Lets check this fore passing the return code into len()

Change-Id: Ic22f37931c13e7ec8bd1fa7872cd2a24faeea0ba
Related: OS#1967
2019-01-23 15:52:43 +01:00
Neels Hofmeyr 3aa34223e1 README: hint at pcscd service dependency 2018-02-28 15:51:19 +01:00
Gerard Pinto 7c52d76fb6 SIM API's to fetch information from SIM file system like Kc, LOCI, MSISDN etc. Added -p option for fetching SIM information based on the parameter passed.
Change-Id: I1f43ff918a6b96f86e661297e84010e6cdf17b84
2017-06-03 00:21:09 -07:00
Neels Hofmeyr 63752ce8ee cosmetic: add/tweak log output, add vim indenting marker
While testing the sysmoUSIM, I found that I wanted to see errors more
prominently and some output for cases that lacked any response at all.

Change-Id: Ia2ac1215ae948558324627f76e28c72a23dc6a68
2017-03-31 12:04:30 +00:00
Harald Welte daf2b13f6c Update README file with general information and convert to Markdown
Change-Id: Ic9f95c073b17bfe689dea7672c67e5c081c01dae
2017-03-17 22:31:28 +01:00
Holger Hans Peter Freyther a1bf5c43e7 Fix BER decoding for the long form
The below ASN1 was parsed as "long form" even if it is not the
long form. The highest bit indicates if it is the long form or
the indefinite form. The below was going through the long form
path but there is no long form in it. Change the long form code
but don't verify it. It might still be broken.

[98, 87, 130, 2, 120, 33, 131, 2, 127, 255, 132, 16, 160, 0, 0, 0, 135, 16, 2, 255, 255, 255, 255, 137, 7, 9, 0, 0, 165, 22, 131, 2, 127, 255, 203, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 1, 128, 138, 1, 5, 171, 21, 128, 1, 1, 164, 6, 131, 1, 10, 149, 1, 8, 128, 1, 64, 151, 0, 128, 1, 6, 144, 0, 198, 9, 144, 1, 64, 131, 1, 1, 131, 1, 129]
2015-06-25 07:14:26 +02:00
Harald Welte 4807dd9b21 add 'ipsec triplets.dat' mode (-I) to osmo-sim-auth.py 2012-07-13 23:30:12 +02:00
Harald Welte c1cd027c8a Initial check-in of a small command line based tool for (U)SIM auth 2011-12-07 01:51:46 +01:00