GnuPG_maintenance: Add a section on --list-packets
authorW. Trevor King <wking@tremily.us>
Sat, 23 May 2015 19:28:42 +0000 (12:28 -0700)
committerW. Trevor King <wking@tremily.us>
Sat, 23 May 2015 19:30:34 +0000 (12:30 -0700)
posts/GnuPG_maintenance.mdwn

index 675907c1ce3300e9a380ae1fc36da0ad82f346d9..06b4ddceac1a9868c6043778ac9405db4b8e4ad3 100644 (file)
@@ -117,6 +117,23 @@ Once you've saved the key, it will change to `[ultimate]`.  I imagine
 the initial `[unknown]` listing is because you haven't officially
 confirmed the new ID's signature by saving your changes.
 
+Inspecting GnuPG files
+----------------------
+
+If you want to see what's inside a GnuPG-generated file (e.g. you
+forgot which subkeys are in the ASCII-armored public key you published
+earlier), you can use:
+
+    $ gpg --list-packets ~/.gnupg/pubkey.txt
+    :public key packet:
+            version 4, algo 17, created 1218318982, expires 0
+    …
+    :public sub key packet:
+            version 4, algo 16, created 1218319006, expires 0
+            …
+            keyid: 7C572F3442407C74
+    …
+
 [keygen]: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&sektion=1
 [diff]: http://www.samsimpson.com/static/pgpfaq#SubRSADH