Ezmlm::GpgKeyRing(3)

NAME
Mail::Ezmlm::GpgKeyRing - Object Methods for gnupg keyring management

SYNOPSIS
 use Mail::Ezmlm::GpgKeyRing;
 $keyring = new Mail::Ezmlm::GpgKeyRing(DIRNAME);

The rest is a bit complicated for a Synopsis, see the description.

DESCRIPTION
Mail::Ezmlm::GpgKeyRing is a Perl module that is designed to provide an object interface to GnuPG keyrings for encrypted mailing lists.

  Setting up a new Mail::Ezmlm::GpgKeyRing object:
   use Mail::Ezmlm::GpgKeyRing;
   $keyring = new Mail::Ezmlm::GpgKeyRing('/home/user/lists/foolist/.gnupg');

new() returns the new instance for success, undefined if there was a problem.

  Determining the location of the configured keyring.
   $whichkeyring = $keyring->get_location();
   print $keyring->get_location();

  Changing which keyring the Mail::Ezmlm::GpgKeyRing object points at:
   $keyring->set_location('/home/user/lists/foolist/.gnupg');

  Export a key:
You may export public keys of the keyring.

The key can be identified by its id or other (unique) patterns (like the gnupg program).

        $keyring->export_key($key_id);
        $keyring->export_key($email_address);

The return value is a string containing the ascii armored key data.

  Import a key:
You can import public or secret keys into the keyring.

The key should be ascii armored.

        $keyring->import_key($ascii_armored_key_data);

  Delete a key:
Remove a public key (and the matching secret key if it exists) from the keyring.

The argument is the id of the key or any other unique pattern.

        $keyring->delete_key($keyid);

  Generate a new key:
        $keyring->generate_key($name, $comment, $email_address, $keysize, $expire);

Refer to the documentation of gnupg for the format of the arguments.

  Getting public keys:
Return an array of key hashes each containing the following elements:

•   name

•   email

•   id

•   expires

        $keyring->get_public_keys();
        $keyring->get_secret_keys();

AUTHOR
 Lars Kruse <devel@sumpfralle.de>

BUGS
 There are no known bugs.

 Please report bugs to the author or use the bug tracking system at
 https://systemausfall.org/trac/ezmlm-web.

SEE ALSO
 gnupg(7), gpg(1), gpg2(1), Crypt::GPG(3pm)

 https://systemausfall.org/toolforge/ezmlm-web/
 http://www.ezmlm.org/