question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle unkonwn public key types in GPG

See original GitHub issue

Right now an unknown public key in GPG stops all processing of that public key block; it’d be great if it ignored such keys and still tested all other keys. To reproduce:

(t) root@6a5c5567c5c4:/roca# gpg --export --armor --keyring /usr/share/keyrings/debian-maintainers.gpg > x
(t) root@6a5c5567c5c4:/roca# roca-detect x
2017-10-16 15:25:39 [6961] ERROR Exception in processing PGP rec file x: Unsupported public key algorithm 22
2017-10-16 15:25:39 [6961] INFO ### SUMMARY ####################
2017-10-16 15:25:39 [6961] INFO Records tested: 0
2017-10-16 15:25:39 [6961] INFO .. PEM certs: . . . 0
2017-10-16 15:25:39 [6961] INFO .. DER certs: . . . 0
2017-10-16 15:25:39 [6961] INFO .. RSA key files: . 0
2017-10-16 15:25:39 [6961] INFO .. PGP master keys: 0
2017-10-16 15:25:39 [6961] INFO .. PGP total keys:  0
2017-10-16 15:25:39 [6961] INFO .. SSH keys:  . . . 0
2017-10-16 15:25:39 [6961] INFO .. APK keys:  . . . 0
2017-10-16 15:25:39 [6961] INFO .. JSON keys: . . . 0
2017-10-16 15:25:39 [6961] INFO .. LDIFF certs: . . 0
2017-10-16 15:25:39 [6961] INFO .. JKS certs: . . . 0
2017-10-16 15:25:39 [6961] INFO No fingerprinted keys found (OK)
2017-10-16 15:25:39 [6961] INFO ################################

(Run on debian/buster)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
J08nYcommented, Oct 18, 2017

Sure PGPy supports all that, let me have a look on how pgpdump is used here, and hopefully make a PR to switch to PGPy.

0reactions
ph4r05commented, Oct 18, 2017

@J08nY thanks for suggestion, lib looks nice and maintained.

I won’t have time to port it to this - API seems different.

I want to preserve all current functionality:

  • all public keys parsing (including sub-keys, PublicKeyPacket, PublicSubkeyPacket)
  • identities parsing (UserIDPacket, name, email)
  • signatures parsing (SignaturePacket)

If the library can do exactly the same as the current one (all json fields extracted) then it is a good choice to change, but I won’t get to that any time soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GPG Configuration Options (Using the GNU Privacy Guard)
This is a space or comma delimited string that gives options used when listing keys and signatures (that is, --list-keys , --check-signatures ,...
Read more >
GnuPG - ArchWiki
You can omit the user-id to export all public keys within your keyring. This is useful if you want to share multiple identities...
Read more >
unknown public key 8F0871F202119294 on Arch Linux
gpg --recv-keys 8F0871F202119294 (AUR). the missing key needs to be added to your USER keyring. I did not need to trust the key...
Read more >
GPG tutorial and PGP Public Key for Alan Eliasen
gpg : assuming bad signature from key BACD0190 due to an unknown critical bit ... can view and manage public and private keys...
Read more >
How to import your existing SSH keys into your GPG key
To add the key, you need to convert the key format from the Privacy-Enhanced Mail (PEM)-encoded format that SSH uses to an OpenPGP-formatted...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found