aboutsummaryrefslogtreecommitdiffstats
path: root/scd/apdu.c
diff options
context:
space:
mode:
Diffstat (limited to 'scd/apdu.c')
-rw-r--r--scd/apdu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index 7f3c320d2..98158648b 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -775,8 +775,8 @@ pcsc_send_apdu (int slot, unsigned char *apdu, size_t apdulen,
if (DBG_CARD_IO)
{
/* Do not dump the PIN in a VERIFY command. */
- if (apdulen > 5 && apdu[1] == 0x20)
- log_debug ("PCSC_data: %02X %02X %02X %02X %02X [redacted]\n",
+ if (apdulen > 5 && apdu[1] == 0x20 && !opt.debug_allow_pin_logging)
+ log_debug ("PCSC_data: %02X %02X %02X %02X %02X [hidden]\n",
apdu[0], apdu[1], apdu[2], apdu[3], apdu[4]);
else
log_printhex (apdu, apdulen, "PCSC_data:");
@@ -1564,8 +1564,8 @@ send_apdu_ccid (int slot, unsigned char *apdu, size_t apdulen,
if (DBG_CARD_IO)
{
/* Do not dump the PIN in a VERIFY command. */
- if (apdulen > 5 && apdu[1] == 0x20)
- log_debug (" raw apdu: %02x%02x%02x%02x%02x [redacted]\n",
+ if (apdulen > 5 && apdu[1] == 0x20 && !opt.debug_allow_pin_logging)
+ log_debug (" raw apdu: %02x%02x%02x%02x%02x [hidden]\n",
apdu[0], apdu[1], apdu[2], apdu[3], apdu[4]);
else
log_printhex (apdu, apdulen, " raw apdu:");