Re: performance: sc_read_record and file caching
Martin Vogt <[email protected]> Wed, 15 Jul 2026 16:16:07 +0200
| Newsgroups | gmane.comp.encryption.opensc.devel |
|---|---|
| Message-ID | <CAOE8yMBjw1voVmmaAOyCDid2BSpt2JqJAVP9KF9UNhyCytvyJg@mail.gmail.com> |
--===============2907636951001641523==
Content-Type: multipart/alternative; boundary="0000000000009e88500656a6f7bb"
--0000000000009e88500656a6f7bb
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I have commented:
/* no record oriented file services */
- jcop_ops.read_record =3D NULL;
+ //jcop_ops.read_record =3D NULL;
And now it reads more things, overall the performance drops, but it seems
this is, because
it's now doing more.
file 4408 seems to have something todo PIN and it cannot be parsed:
P:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11]
pkcs15.c:2485:sc_pkcs15_read_file: path=3D3f0050154408, index=3D0, count=3D=
-1
P:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11]
pkcs15-cache.c:132:sc_pkcs15_read_cached_file: try to read cache for
3f0050154408
P:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11]
card.c:1105:sc_card_ctl: called with cmd=3D6
P:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11]
card.c:1112:sc_card_ctl: card_ctl(6) not supported
P:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11]
pkcs15-cache.c:136:sc_pkcs15_read_cached_file: read cached file
/home/kde/.cache/opensc/0267000500352503_NODATE_50154408
P:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11]
pkcs15.c:2639:sc_pkcs15_read_file: returning with: 0 (Success)
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15-pin.c:149:sc_pkcs15_decode_aodf_entry: AuthType: PIN
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15-pin.c:146:sc_pkcs15_decode_aodf_entry: ASN.1 decoding failed: -1402
(Required ASN.1 object not found)
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15.c:2195:sc_pkcs15_parse_df: Required ASN.1 object not found: Error
decoding DF entry
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15.c:2219:sc_pkcs15_parse_df: returning with: -1402 (Required ASN.1
object not found)
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15.c:1843:sc_pkcs15_find_pin_by_flags: returning with: -1407 (Requested
object not found)
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15.c:1816:sc_pkcs15_find_pin_by_flags: called
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15.c:1817:sc_pkcs15_find_pin_by_flags: Find PIN flags:0x12, mask:0xD2,
index:-1
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
pkcs15.c:1840:sc_pkcs15_find_pin_by_flags: returning with: 0 (Success)
P:17537; T:0x140530311640384 16:00:14.051 [opensc-pkcs11]
framework-pkcs15.c:1688:pkcs15_create_tokens: Flags:0x8; Auth User/Sign
PINs 0x55eb829d7f10/(nil)
Okay, seems I'm lost here. How do I find this ASN.1 object?
On Wed, Jul 15, 2026 at 3:18=E2=80=AFPM Martin Vogt <[email protected]> wrot=
e:
>
>
> Hello,
>
> I'm seeing with use_file_caching some files which can't be cached.
> Over a remote connection (RDP) these APDU calls accumulate, so I checked
> what can be the problem.
>
>
--0000000000009e88500656a6f7bb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><br><div>I have commented:</div><div><br>=
</div><div><span style=3D"font-family:monospace"><span style=3D"color:rgb(0=
,0,0)">=C2=A0 =C2=A0 =C2=A0 /* no record oriented file services */</span><s=
pan style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(178,24,24)">- =C2=A0=C2=A0=C2=A0=C2=A0j=
cop_ops.read_record =3D NULL;</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(24,178,24)">+ =C2=A0=C2=A0=C2=A0=C2=A0/=
/jcop_ops.read_record =3D NULL;</span><br><span style=3D"color:rgb(0,0,0)">
</span><br></span></div><div><span style=3D"font-family:monospace">And now =
it reads more things, overall the performance drops, but it seems this is, =
because</span></div><div><span style=3D"font-family:monospace">it's now=
doing more.</span></div><div><span style=3D"font-family:monospace"><br></s=
pan></div><div>file 4408 seems to have something todo PIN and it cannot be =
parsed:<span style=3D"font-family:monospace"></span></div><div><br></div><d=
iv><span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0)">P=
:17537; T:0x140530311640384 16:00:14.050 [opensc-pkcs11] pkcs15.c:2485:sc_p=
kcs15_read_file: path=3D3f0050154408, index=3D0, count=3D-1</span><span sty=
le=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.050 [opensc-pkcs11] pkcs15-cache.c:132:sc_pkcs15_read_cached_file: t=
ry to read cache for 3f0050154408</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.050 [opensc-pkcs11] card.c:1105:sc_card_ctl: called with cmd=3D6</sp=
an><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.050 [opensc-pkcs11] card.c:1112:sc_card_ctl: card_ctl(6) not support=
ed</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.050 [opensc-pkcs11] pkcs15-cache.c:136:sc_pkcs15_read_cached_file: r=
ead cached file /home/kde/.cache/opensc/0267000500352503_NODATE_50154408</s=
pan><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.050 [opensc-pkcs11] pkcs15.c:2639:sc_pkcs15_read_file: returning wit=
h: 0 (Success)</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15-pin.c:149:sc_pkcs15_decode_aodf_entry: Au=
thType: PIN</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15-pin.c:146:sc_pkcs15_decode_aodf_entry: AS=
N.1 decoding failed: -1402 (Required ASN.1 object not found)</span><span st=
yle=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15.c:2195:sc_pkcs15_parse_df: Required ASN.1=
object not found: Error decoding DF entry</span><span style=3D"color:rgb(0=
,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15.c:2219:sc_pkcs15_parse_df: returning with=
: -1402 (Required ASN.1 object not found)</span><span style=3D"color:rgb(0,=
0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15.c:1843:sc_pkcs15_find_pin_by_flags: retur=
ning with: -1407 (Requested object not found)</span><span style=3D"color:rg=
b(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15.c:1816:sc_pkcs15_find_pin_by_flags: calle=
d</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15.c:1817:sc_pkcs15_find_pin_by_flags: Find =
PIN flags:0x12, mask:0xD2, index:-1</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] pkcs15.c:1840:sc_pkcs15_find_pin_by_flags: retur=
ning with: 0 (Success)</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">P:17537; T:0x140530311640384 16=
:00:14.051 [opensc-pkcs11] framework-pkcs15.c:1688:pkcs15_create_tokens: Fl=
ags:0x8; Auth User/Sign PINs 0x55eb829d7f10/(nil)</span><br><span style=3D"=
color:rgb(0,0,0)">
</span><br></span></div><div><span style=3D"font-family:monospace">Okay, se=
ems I'm lost here. How do I find this=C2=A0</span><span style=3D"backgr=
ound-color:transparent">ASN.1 object?</span></div><div><span style=3D"backg=
round-color:transparent"><br></span></div><div><br></div><div><span style=
=3D"font-family:monospace"><br></span></div><div><span style=3D"font-family=
:monospace"><br></span></div></div><br><div class=3D"gmail_quote gmail_quot=
e_container"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 15, 2026 at =
3:18=E2=80=AFPM Martin Vogt <<a href=3D"mailto:[email protected]">mvogt1@=
gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div dir=3D"ltr"><br><div><br></div><div><span style=3D"font-fam=
ily:monospace"><span style=3D"color:rgb(0,0,0)">Hello,</span><span style=3D=
"color:rgb(0,0,0)">
</span><br>
<br><span style=3D"color:rgb(0,0,0)">I'm seeing with use_file_caching s=
ome files which can't be cached.</span><span style=3D"color:rgb(0,0,0)"=
>
</span><br><span style=3D"color:rgb(0,0,0)">Over a remote connection (RDP) =
these APDU calls accumulate, so I checked what can be the problem.</span><s=
pan style=3D"color:rgb(0,0,0)">
</span><br></span><span style=3D"font-family:monospace"><br></span></div></=
div>
</blockquote></div></div>
--0000000000009e88500656a6f7bb--
--===============2907636951001641523==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============2907636951001641523==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Opensc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
--===============2907636951001641523==--