\Horde_Crypt_Pgp_Keyserver

Provides methods to connect to a PGP keyserver.

Connects to a public key server via HKP (Horrowitz Keyserver Protocol). http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00

Summary

Methods
Properties
Constants
__construct()
get()
put()
getKeyId()
No public properties found
No constants found
_createUrl()
$_http
$_keyserver
$_pgp
N/A
No private methods found
No private properties found
N/A

Properties

$_http

$_http : \Horde_Http_Client

HTTP object.

Type

\Horde_Http_Client

$_keyserver

$_keyserver : string

Keyserver hostname.

Type

string

Methods

__construct()

__construct(\Horde_Crypt_Pgp  $pgp, array  $params = array()) 

Constructor.

Parameters

\Horde_Crypt_Pgp $pgp

A Horde_Crypt_Pgp object.

array $params

Optional parameters:

  - http: (Horde_Http_Client) The HTTP client object to use.
  - keyserver: (string) The public PGP keyserver to use.
  - port: (integer) The public PGP keyserver port.

get()

get(string  $keyid) : string

Returns PGP public key data retrieved from a public keyserver.

Parameters

string $keyid

The key ID of the PGP key.

Throws

\Horde_Crypt_Exception

Returns

string —

The PGP public key.

put()

put(string  $pubkey) 

Sends a PGP public key to a public keyserver.

Parameters

string $pubkey

The PGP public key

Throws

\Horde_Crypt_Exception

getKeyId()

getKeyId(string  $address) : string

Returns the first matching key ID for an email address from a public keyserver.

Parameters

string $address

The email address of the PGP key.

Throws

\Horde_Crypt_Exception

Returns

string —

The PGP key ID.

_createUrl()

_createUrl(string  $uri, array  $params = array()) : \Horde_Url

Create the URL for the keyserver.

Parameters

string $uri

Action URI.

array $params

List of parameters to add to URL.

Returns

\Horde_Url —

Keyserver URL.