scd: binary data returned when sending direct APDU

Ingo Klöcker kloecker at kde.org
Wed Dec 21 18:58:32 CET 2022


On Mittwoch, 21. Dezember 2022 17:51:39 CET Alexandre Vaissière via Gnupg-
users wrote:
> I am trying to send arbitrary APDU commands via scd. When doing that I
> noticed that scd answers me with binary data. For example:
> 
> gpg-connect-agent
> > scd apdu 00 A4 04 00 07 A0 00 00 05 27 21 01
> D yZ��... <other binary data>
> OK
> 
> As assuan protocol is supposed to transmit utf-8 encoded string data, I
> would have expected an hexified string as returned data (as the input
> data is). Is that a bug or the expected behaviour?

I suppose this is intended behavior (because data is often text and you don't 
want to get that in hex). You may want to use `gpg-connect-agent --hex`.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20221221/2889f8da/attachment.sig>


More information about the Gnupg-users mailing list