scdaemon on macOS resolves legacy SCardControl, preventing PIN-pad use

NIIBE Yutaka gniibe at fsij.org
Thu Sep 24 10:04:43 CEST 2026


Hello,

Thank you for your report.

Mario Hoberg wrote:
> On macOS, scdaemon resolves SCardControl with dlsym() but calls it
> through a seven-argument function pointer. Apple’s PC/SC framework
> exports SCardControl as the legacy five-argument function; its
> seven-argument function is named SCardControl132.

I have looked around PC/SC-lite and OpenSC, and this is a kind of old
problem.  It seems that pinpad feature is not used on macOS.

I think that it is better to follow what OpenSC does; Try to find the
function by the symbol "ScardControl132" and then the symbol
"ScardControl" if "ScardControl132" fails.  If Apple will change to
follow new API, it will still work.

Attached is a patch candidate:
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-scd-Fix-pinpad-handling-for-macOS.patch
Type: text/x-diff
Size: 1687 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20260924/75d4c72a/attachment-0001.patch>


More information about the Gnupg-users mailing list