Patch for my smart-card

Antonino Iacono <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gpa.devel
Message-ID <[email protected]>
Hi, 
my name is  Antonino Iacono and I write the first email on this list, excused 
to my bad English, thanks for your job,
as you can read thanks to it I can use kmail with my smart card.
However for being able to make it I have had to modify gnupg-1.9.5, here the 
modifications.

_______________________________________________
Gpa-dev mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gpa-dev
gnupg-1.9.5.patch (text/x-diff, 1.6 KB)
--- gnupg-1.9.5/scd/command.c	2004-02-19 13:48:16.000000000 +0100
+++ gnupg-1.9.5.patched/scd/command.c	2004-02-25 16:51:10.000000000 +0100
@@ -95,12 +95,18 @@
 open_card (CTRL ctrl, const char *apptype)
 {
   int slot;
+  int a_patch; 
 
   if (ctrl->app_ctx)
     return 0; /* Already initialized for one specific application. */
   if (ctrl->card_ctx)
     return 0; /* Already initialized using a card context. */
 
+    a_patch = card_open (&ctrl->card_ctx);
+      if (a_patch)
+        return map_to_assuan_status (a_patch);
+    return 0;
+
   slot = apdu_open_reader (opt.reader_port);
   if (slot != -1)
     {
--- gnupg-1.9.5/scd/card.c	2004-01-27 09:37:23.000000000 +0100
+++ gnupg-1.9.5.patched/scd/card.c	2004-02-25 16:51:03.000000000 +0100
@@ -336,6 +336,10 @@
      always get the serialnumber from the 2F02 GDO file.  */
   /* FIXME: in case we can't parse the 2F02 EF and we have a P15 card,
      we should get the serial number from the respective P15 file */
+  
+  sc_format_path ("3F00", &path);
+  rc = sc_select_file (card->scard, &path, &file);
+  
   sc_format_path ("3F002F02", &path);
   rc = sc_select_file (card->scard, &path, &file);
   if (rc)

--- gnupg-1.9.5/agent/call-scd.c	2004-01-29 19:37:02.000000000 +0100
+++ gnupg-1.9.5.patched/agent/call-scd.c	2004-02-25 16:51:36.000000000 +0100
@@ -486,7 +486,7 @@
 
   sprintf (line, "SETDATA ");
   p = line + strlen (line);
-  for (i=0; i < indatalen ; i++, p += 2 )
+  for (i=15; i < indatalen ; i++, p += 2 )
     sprintf (p, "%02X", indata[i]);
   rc = assuan_transact (scd_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
   if (rc)
smime.p7s (application/pkcs7-signature, 3.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.