Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Paste
P12
Fallback for keys with keyid but no finterprint value in gpgme
Active
Public
Actions
Authored by
•
aheinecke
on May 19 2021, 1:19 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index b893a7cd..9d9f4615 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -292,10 +292,14 @@ const char *Key::primaryFingerprint() const
/* Return what gpgme thinks is the primary fingerprint */
return key->fpr;
}
- if (key->subkeys) {
+ if (key->subkeys && key->subkeys->fpr) {
/* Return the first subkeys fingerprint */
return key->subkeys->fpr;
}
+ if (key->subkeys && key->subkeys->keyid) {
+ /* When no fingerprint is available use the first subkeys keyid */
+ return key->subkeys->keyid;
+ }
return nullptr;
}
Event Timeline
•
aheinecke
created this paste.
May 19 2021, 1:19 PM
2021-05-19 13:19:44 (UTC+2)
•
werner
mentioned this in
rGa4e04375e84e: sm: Rework the PKCS#12 parser to support DFN issued keys.
.
Jun 20 2022, 5:34 PM
2022-06-20 17:34:53 (UTC+2)
•
ikloecker
mentioned this in
T5713: Kleopatra: PKCS#12 Import no Error on bad passphrase
.
Sep 9 2022, 6:25 PM
2022-09-09 18:25:20 (UTC+2)
•
werner
mentioned this in
T4921: Support import of PKCS#12 encoded ECC private keys.
.
Jul 5 2023, 2:29 PM
2023-07-05 14:29:32 (UTC+2)
•
werner
mentioned this in
T3927: gpgsm certificate import fails because of hardcoded password length limitation
.
Aug 25 2023, 4:04 PM
2023-08-25 16:04:06 (UTC+2)
lecris
mentioned this in
T6757: gpgsm 2.4 Fails to import P12 certificate/key
.
Oct 10 2023, 5:45 PM
2023-10-10 17:45:33 (UTC+2)
•
werner
mentioned this in
rGf50dde6269bd: gpgsm: Possible improvement for some rare P12 files.
.
Oct 1 2024, 12:35 PM
2024-10-01 12:35:52 (UTC+2)
•
werner
mentioned this in
rG41626a16613a: gpgsm: Possible improvement for some rare P12 files.
.
Oct 1 2024, 12:51 PM
2024-10-01 12:51:10 (UTC+2)
•
werner
mentioned this in
rG5f9975abf525: gpgsm: Possible improvement for some rare P12 files.
.
Nov 8 2024, 8:50 AM
2024-11-08 08:50:49 (UTC+1)
•
werner
mentioned this in
T7289: Release GnuPG 2.5.2
.
Thu, Dec 5, 11:47 AM
2024-12-05 11:47:39 (UTC+1)
Log In to Comment