Detection of sign-only vs. sign-and-encrypt keys

Atom 'Smasher' atom at suspicious.org
Tue Jun 22 20:07:23 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 22 Jun 2004, Marcus Frings wrote:

> could anyone please point me to the right section in the man page
> (which I'm obviously missing) how I can find out with a single gpg
> command line option if a key is just a sign-only key or a "normal"
> sign-and-encrypt key?
=============================

i'm not sure if there's a command to tell you that, as such.

one way to do it is this:
   $ echo test | gpg --trust-model always -er 0xD9F57808 2> /dev/null > /dev/null ; echo $?

if it says "0" the key can be used for encryption. anything else means the 
key can't be used for encryption... maybe because there's no encryption 
key, maybe because it's expired, revoked, not found ...


 	...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	To become vegetarian is to step into the stream
 	which leads to nirvana.
 		-- Buddha
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iEYEARECAAYFAkDYdWIACgkQnCgLvz19QeP54QCfT5VZ/gNuK2dyVAAmNTAwUZhc
7aIAmQG52WjvfhQgfgOU7uQZAX/b+/aP
=/7rj
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list