diff options
author | Werner Koch <[email protected]> | 2022-08-16 09:21:39 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-08-16 10:34:00 +0000 |
commit | 287597cb2263c724a4c60995c92f9c86a7e06a25 (patch) | |
tree | 85eee0299052c75582a9092906e97e13b1602af3 | |
parent | doc: Update description of the key format. (diff) | |
download | gnupg-287597cb2263c724a4c60995c92f9c86a7e06a25.tar.gz gnupg-287597cb2263c724a4c60995c92f9c86a7e06a25.zip |
gpg: Fix --card-status to handle lowercase APPTYPEs
* g10/card-util.c (current_card_status): Use ascii_strcasecmp.
-rw-r--r-- | g10/card-util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/g10/card-util.c b/g10/card-util.c index a5f1f7bb7..339194fb5 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -410,29 +410,29 @@ current_card_status (ctrl_t ctrl, estream_t fp, || strlen (info.serialno) != 32 ) { const char *name1, *name2; - if (info.apptype && !strcmp (info.apptype, "openpgp")) + if (info.apptype && !ascii_strcasecmp (info.apptype, "openpgp")) goto openpgp; - else if (info.apptype && !strcmp (info.apptype, "NKS")) + else if (info.apptype && !ascii_strcasecmp (info.apptype, "NKS")) { name1 = "netkey"; name2 = "NetKey"; } - else if (info.apptype && !strcmp (info.apptype, "DINSIG")) + else if (info.apptype && !ascii_strcasecmp (info.apptype, "DINSIG")) { name1 = "dinsig"; name2 = "DINSIG"; } - else if (info.apptype && !strcmp (info.apptype, "P15")) + else if (info.apptype && !ascii_strcasecmp (info.apptype, "P15")) { name1 = "pkcs15"; name2 = "PKCS#15"; } - else if (info.apptype && !strcmp (info.apptype, "GELDKARTE")) + else if (info.apptype && !ascii_strcasecmp (info.apptype, "GELDKARTE")) { name1 = "geldkarte"; name2 = "Geldkarte"; } - else if (info.apptype && !strcmp (info.apptype, "PIV")) + else if (info.apptype && !ascii_strcasecmp (info.apptype, "PIV")) { name1 = "piv"; name2 = "PIV"; |