An ISIM holds the parameters a registration starts from (TS 24.229
5.1.1.1A): the private identity in EF_IMPI, the home domain in
EF_DOMAIN and public identities in EF_IMPU (TS 31.103 4.2.2 to 4.2.4),
of which the first record's is the one to register (GSMA IR.92 2.2.1).
TS 23.003 has a UE derive its home domain and a temporary public
identity from the IMSI "if there is no ISIM application" (13.2, 13.4B);
those derived names are the only ones imsd has. This is the part of
reading an ISIM that has no I/O; the daemon does not use it yet.
ParseIsimApp finds the ISIM application of one slot in qmicli's card
status, in whatever state the modem lists it. On the two cards with an
ISIM that a read-only probe read (a US card, 2026-11-23, and a
Norwegian one, 2026-11-21) the Fairphone 6's modem lists the ISIM
`detected` beside the `ready` USIM, and on both a logical channel
opened on it and its identity files were read.
The commands are the ones that probe sent: SELECT by file identifier,
READ BINARY, READ RECORD (TS 102 221 11.1.1, 11.1.3, 11.1.5).
ApduAnswer is a card's answer, '90 00', '91 XX' and '92 XX' its normal
endings (10.2.1.1), and ApduFollowUp the command it asks for next when
the answer brought no data: GET RESPONSE for '61 XX', a command without
data again with the length named for '6C XX' (7.3.1.1.5); an answer
with data is taken for the command's last. HoldsRead takes a read's
data under the warning '62 82' as well (10.2.1.3). ParseIsimValue takes
the value of the data object with tag '80' that a file begins with,
cuts 'FF' bytes from the end of its length as the probe does, and gives
none for a value with a blank or a byte that is not printable ASCII.
IsimIdentity checks the three values before they replace the derived
names: they are written into a quoted string and between the angle
brackets of SIP header fields. It refuses a value with a quote, a
backslash, an angle bracket, a blank, a line break or another byte
outside printable ASCII, a private or a public identity of more than
255 characters, a private identity without an @ between two parts, a
domain that is not labels of letters, digits and inner hyphens, 63
characters a label and 253 in all at most, and a public identity that
does not begin sip: or is that alone.
The two readers of the card status share how they read a line;
ParseCardStatus gives what it gave.
Tested: tests/Aka (the application out of a card status with the US
card's two applications, in either order, and out of a second slot with
the Norwegian card's AID; the commands, the answers and their
follow-ups, the values, the identity and what is refused) and
tests/Messages (the two REGISTERs of an ISIM's identity against the
pinned ones).