Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I3aa6efff615bf6a089eb4c0727069c1fdc5883f0
|
|
Change-Id: If7d8fdc98fac349bf6dd4ecc9bbc7bea03524489
|
|
Change-Id: Iac752c8ef6cbc085c2f190be1e07a660fe3cd18a
|
|
Change-Id: Id3ae902ffb0a25fb69e2ebb469f925b7482f8d26
|
|
Change-Id: I0cf003270b7a80f620f8f0bbf6be63e2ce801d3c
|
|
Something like "this._.total_len-1" only works during decode. Let's
use GreedyBytes instead, working for encode and decode.
Change-Id: Idf8326298cab7ebc68b09c7e829bfc2061222f51
|
|
Change-Id: I001a353ef66baa08ea014987eb50f0bff65123c0
|
|
Change-Id: I28a46d3f1054437711dc45455f1d49e87ed1d2df
|
|
Change-Id: I3f11252ad2173a5ee08db66e4a97441e194d4f7d
|
|
Change-Id: I44634f35e540625ee669a0ac15a5e249711f6b52
|
|
Change-Id: I587a1bf78c94732493561f4a5d41c5119e596463
|
|
Change-Id: Iec8c9fbf4232994958371a928a29e6b149976ae4
|
|
Change-Id: I5710b82c2eea6b6bf5b38882b2a1ec7d60a725d8
|
|
Change-Id: I9d3f9b16dc885f4e2b864a976d6bc09b3c17b2ee
|
|
Change-Id: I501f2fea075706df379a4bd65a7c6bc19f48277f
|
|
Change-Id: Ie5bae9d823bca6f6c658bd455303f63bace2258c
|
|
Change-Id: I1cbbbabd22a67048f3ee9330c12f72c34152ce45
|
|
As pySim.cdma_ruim was not imported by test_files.py, the unit tests
were apparently never executed and hence didn't pass. Let's fix both
of those problems.
Change-Id: Icdf4621eb68d05a4948ae9efeb81a007d48e1bb7
|
|
This gives a meaningful decode during pySim-trace.
Change-Id: Ifa410e1fefc25e87ffa8e3a2230af80180a36a18
|
|
This will decode the ENVELOPE body in pySim-trace further.
Before:
00 ENVELOPE - 9000 {'p1': 0, 'p2': 0, 'cmd': 'd14682028381060291978b3c40048111227ff6407070611535002d02700000281516011212000001eae1bd578fa25791898128811b2206cc71639ca292ec2526da8aef4273d2fe2e', 'rsp': '027100001f0a00000100000001200000ab12800101230d08a0000001510000000f829000'}
After:
00 ENVELOPE - 9000 {'p1': 0, 'p2': 0, 'cmd': [{'smspp_download': [{'device_identities': {'source_dev_id': 'network', 'dest_dev_id': 'uicc'}}, {'address': {'ton_npi': 145, 'call_number': '79'}}, {'sms_tpdu': {'tpdu': '40048111227ff6407070611535002d02700000281516011212000001eae1bd578fa25791898128811b2206cc71639ca292ec2526da8aef4273d2fe2e'}}]}], 'rsp': '027100001f0a00000100000001200000ab12800101230d08a0000001510000000f829000'}
Change-Id: I5ecdbe0b5fa8856cb723569896b73cd49778ed5f
|
|
Change-Id: I713f12577cab1678cdf97b7ae0e6f3815a42242c
|
|
So far we only supported construct.
Change-Id: Ibb80d328c9a1f464aa5338ca0ca1d6bfb00734e1
|
|
The "TCA Loader" is a freeware utility program published by the
Trusted Connectivity Alliance for testing SCP80, SCP81, SCP02 and SCP03
in UICCs. It can generate text log files of the APDUs it exchanges;
let's add this file format to pySim-trace
Change-Id: Ie76d36bb18c6bd8968d2a5b74ec1b8c5ccaaa409
|
|
Now that CardKeyProvider is capable of storing key materials
transport-key-encrypted, we can use this functionality to look up the
SCP02 / SCP03 key material for a given security domain.
This patch implements this for the ISD-R and ECASD using a look-up by
EID inside the CSV.
Change-Id: I2a21f031ab8af88019af1b8390612678b9b35880
|
|
It's generally a bad idea to keep [card specific] key material lying
around unencrypted in CSV files. The industry standard solution in the
GSMA is a so-called "transport key", which encrypts the key material.
Let's introduce support for this in the CardKeyProvider (and
specifically, the CardKeyProviderCSV) and allow the user to specify
transport key material as command line options to pySim-shell.
Different transport keys can be used for different key materials, so
allow specification of keys on a CSV-column base.
The higher-level goal is to allow the CSV file not only to store
the ADM keys (like now), but also global platform key material for
establishing SCP towards various security domains in a given card.
Change-Id: I13146a799448d03c681dc868aaa31eb78b7821ff
|
|
Change-Id: Ie6fc24695dd956a4f9fd6f243d3b0ef66acf877b
|
|
So far the main use case was to read a ProfileElement-SD from
a DER file. But when we want to construct one from scratch,
we need to have the constructor put some meaningful [default]
values into the class members.
Change-Id: I69e104f1d78165c12291317326dbab05977a1574
|
|
We now cover all PE types as of PE_Definitions-3.3.1.asn
Change-Id: I37951a0441fe53fce7a329066aebd973389cb743
|
|
Change-Id: I37b9eb4cfb74de79b0493986d976c8a5f8ccd8ea
|
|
This way it's possible to programmatically inspect and modify the
high-level decoded key material inside a securityDomain profile element.
Change-Id: I18b1444303de80eaddd840a7e0061ea0098a8ba1
|
|
It's rather useful to have derived classes implementing specific
functions related to that SAIP profile type. Let's introruce that
concept and a first example for securityDomain, where methods allow
checking/adding/removing support for SCPs.
Change-Id: I0929cc704b2aabddbc2ddee79ab8b674b1ed4691
|
|
When de-MAC-ing at the recipient side, we must increment the cipher(!)
block number even if no ciphering is done at all.
We did this correctly for MAC (sender) case, but not on the de-MAC
(receiver) case.
Change-Id: I97993f9e8357b36401d435aaa15558d1c7e411eb
|
|
In the eSIM RSP univers there are some rather ugly layering violatoins
where ASN.1 cannot be parsed but we have to mess with raw TLVs and the
details of DER encoding. Let's add two funtions that make it more
convenient to work with this: They return the raw tag as integer, or
even the entire encoded TLV rather than the value part only.
Change-Id: I1e68a4003b833e86e9282c77325afa86ce144b98
|
|
Change-Id: I549ef7002e6ebef3f13af620cad8d03c7f4d891a
|
|
GlobalPlatform has a [non-public] "UICC Configuration" spec, which
defines some specific aspects of implementing GlobalPlatform in the
context of an UICC. Let's add some python definitions about it.
Change-Id: If4cb110a9bc5f873b0e097c006bef59264ee48fa
|
|
Before this patch we had three different error causes that would cause a
"Verification failed" error message. Let's state explicitly which part
of verification did actually fail.
Change-Id: I5030758fe365bb802ae367b494aace5a66bc7a91
|
|
We used to re-encode those parts of a decoded ASN.1 struct that is
cryptographically signed in the GSMA SGP.22 specification. However, if
the received data follows a later spec and contains new/unknown records,
then our poor-man's attempt at re-encoding will render a different
binary, which in turn means the signature check will fail.
Let's instead do a manual step-by-step raw decode of the DER TLV
structure to extract the actual binary information of parts of ASN.1
objects.
Change-Id: I4e31fd4b23ec3be15b9d07c2c30a3e31e22bdda1
Closes: OS#6473
|
|
Change-Id: I5b6ad752fea09ed9632f150dfbbabf2156a5a9c0
|
|
... and populate the RuntimeState.identity['EID'] wit it, so other
[future] parts of the system can use it.
Let's also print the EID (if available) from the 'cardinfo' shell
command.
Change-Id: Idc2ea1d9263f39b3dff403e1535a5e6c4e88b26f
|
|
In the previous patch, we've introduced a new 'identities' dict as part
of the runtime state. Let's migrate our ICCID storage into it for
consistency.
Change-Id: Ibdcf9a7c4e7e445201640bce33b768bcc4460db1
|
|
This patch introduces the dict, as well as its first use for ATR storage
Change-Id: Ief5ceaf5afe82800e33da233573293527befd2f4
|
|
The get_eid command is actually sending the command apdu twice, as
it contains both an older implementation (result unused) and the newer
one.
Change-Id: Ie82bb09f4fc30bc879029b83147dad5614792b48
|
|
Let's have the card tell us what the length is by indicating '00'
instead of stating 'FF'. This is better aligned with general practice
and won't break assumptions in other parts of the code like SCP
transport.
Change-Id: Ied63c6e1970e3dfc675da5e5f94579fbb06fea51
|
|
A mix-up betewen underscore and dash resulted in:
Change-Id: I49d12b7c7ae2a343940e87d5069c0ae44a9bc50c
AttributeError: 'Namespace' object has no attribute 'application_aid'
|
|
When running without an argument, let argparse print a nice usage error:
$ ./sim-rest-client.py
usage: sim-rest-client.py [-h] [-H HOST] [-p PORT] [-v] [-n SLOT_NR] {auth,info} ...
sim-rest-client.py: error: the following arguments are required: {auth,info}
Instead of:
$ ./sim-rest-client.py
Traceback (most recent call last):
File "/usr/share/pysim/contrib/./sim-rest-client.py", line 185, in <module>
main(sys.argv)
File "/usr/share/pysim/contrib/./sim-rest-client.py", line 181, in main
args.func(args)
^^^^^^^^^
AttributeError: 'Namespace' object has no attribute 'func'
Change-Id: I92998d9b94dcfb9dcfc3da161fe5d8f45f242b78
|
|
Fixes running contrib/sim-rest-server.py:
builtins.AttributeError: 'Namespace' object has no attribute 'pcsc_shared'
Change-Id: I864f65849c5d43cf7c73e60f1935afdf4273f696
|
|
Something like "this._.total_len-1" only works during decode. Let's
use GreedyBytes instead, working for encode and decode.
Change-Id: Idf8326298cab7ebc68b09c7e829bfc2061222f51
|
|
File "/crypt/space/home/laforge/projects/git/pysim/pySim/sysmocom_sja2.py", line 180, in __init__
self._construct = Struct(Const(b'\x82'), 'time_unit'/self.TimeUnit, 'value'/Int8ub,
^^^^^
NameError: name 'Const' is not defined
Change-Id: If34a48e349680ef84e68a4a1a19dde536ecda0e6
|
|
We currently do not support M2M eUICC
Change-Id: I3deb9f181075411484158471012ed449c83028fa
|
|
pySim-trace.py:198:27: E0606: Possibly using variable 's' before assignment (possibly-used-before-assignment)
Change-Id: I28c137a20143b2cd6ea9a0d5461ab61fcd6fe935
|