It seems reportbug failed to include the patch file, so here it is.

- Felix
--- gnupg2-2.2.27.orig/scd/ccid-driver.c
+++ gnupg2-2.2.27/scd/ccid-driver.c
@@ -3584,6 +3584,16 @@ ccid_transceive_secure (ccid_driver_t ha
     return CCID_DRIVER_ERR_NOT_SUPPORTED;
 
   msg = send_buffer;
+
+  if (handle->id_vendor == VENDOR_SCM)
+    {
+      DEBUGOUT ("sending escape sequence to switch to a case 1 APDU\n");
+      rc = send_escape_cmd (handle, (const unsigned char*)"\x80\x02\x00", 3,
+                            NULL, 0, NULL);
+      if (rc)
+        return rc;
+    }
+
   msg[0] = cherry_mode? 0x89 : PC_to_RDR_Secure;
   msg[5] = 0; /* slot */
   msg[6] = seqno = handle->seqno++;

Reply via email to