* keyedit.c (keyedit_menu): Don't show "addcardkey" in the menu if we do
authorDavid Shaw <dshaw@jabberwocky.com>
Tue, 21 Sep 2004 22:24:47 +0000 (22:24 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Tue, 21 Sep 2004 22:24:47 +0000 (22:24 +0000)
not have card support.

* keydb.h, keyserver.c (print_keyrec, keyserver_spawn): fpr is an array of
unsigned bytes.

g10/ChangeLog
g10/keydb.h
g10/keyedit.c
g10/keyserver.c

index 0b88373..54d766c 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-21  David Shaw  <dshaw@jabberwocky.com>
+
+       * keyedit.c (keyedit_menu): Don't show "addcardkey" in the menu if
+       we do not have card support.
+
+       * keydb.h, keyserver.c (print_keyrec, keyserver_spawn): fpr is an
+       array of unsigned bytes.
+
 2004-09-20  Werner Koch  <wk@g10code.com>
 
        * g10.c: Make -K an alias for --list-secret-keys.
index c28ed5f..e3f53a3 100644 (file)
@@ -136,7 +136,7 @@ struct keydb_search_desc {
     void *skipfncvalue;
     union {
         const char *name;
-        char fpr[MAX_FINGERPRINT_LEN];
+        byte fpr[MAX_FINGERPRINT_LEN];
         u32  kid[2];
     } u;
     int exact;
index 014f3a8..95213f7 100644 (file)
@@ -1224,7 +1224,9 @@ keyedit_menu( const char *username, STRLIST locusr,
        /* delphoto is really deluid in disguise */
        { N_("delphoto"), cmdDELUID    , 0,1, NULL },
        { N_("addkey")  , cmdADDKEY    , 1,1, N_("add a secondary key") },
+#ifdef ENABLE_CARD_SUPPORT
        { N_("addcardkey"), cmdADDCARDKEY , 1,1, N_("add a key to a smartcard") },
+#endif /* ENABLE_CARD_SUPPORT */
        { N_("delkey")  , cmdDELKEY    , 0,1, N_("delete a secondary key") },
        { N_("addrevoker"),cmdADDREVOKER,1,1, N_("add a revocation key") },
        { N_("delsig")  , cmdDELSIG    , 0,1, N_("delete signatures") },
index dc1230c..ab3c18d 100644 (file)
@@ -346,13 +346,13 @@ print_keyrec(int number,struct keyrec *keyrec)
     case KEYDB_SEARCH_MODE_FPR16:
       printf("key ");
       for(i=0;i<16;i++)
-       printf("%02X",(unsigned char)keyrec->desc.u.fpr[i]);
+       printf("%02X",keyrec->desc.u.fpr[i]);
       break;
 
     case KEYDB_SEARCH_MODE_FPR20:
       printf("key ");
       for(i=0;i<20;i++)
-       printf("%02X",(unsigned char)keyrec->desc.u.fpr[i]);
+       printf("%02X",keyrec->desc.u.fpr[i]);
       break;
 
     default:
@@ -859,7 +859,7 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
                fprintf(spawn->tochild,"0x");
 
                for(f=0;f<MAX_FINGERPRINT_LEN;f++)
-                 fprintf(spawn->tochild,"%02X",(byte)desc[i].u.fpr[f]);
+                 fprintf(spawn->tochild,"%02X",desc[i].u.fpr[f]);
 
                fprintf(spawn->tochild,"\n");
              }
@@ -870,7 +870,7 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
                fprintf(spawn->tochild,"0x");
 
                for(f=0;f<16;f++)
-                 fprintf(spawn->tochild,"%02X",(byte)desc[i].u.fpr[f]);
+                 fprintf(spawn->tochild,"%02X",desc[i].u.fpr[f]);
 
                fprintf(spawn->tochild,"\n");
              }