Horde_Pgp_Keyserver
in package
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
Tags
Table of Contents
- DEFAULT_KEYSERVER = 'http://pool.sks-keyservers.net:11371'
- Default keyserver.
- $_http : Horde_Http_Client
- HTTP object.
- $_keyserver : string
- Keyserver hostname.
- __construct() : mixed
- Constructor.
- get() : Horde_Pgp_Element_PublicKey
- Returns PGP public key data retrieved from a public keyserver.
- getKeyByEmail() : Horde_Pgp_Element_PublicKey
- Returns the first matching key for an email address from a public keyserver.
- put() : mixed
- Sends a PGP public key to a public keyserver.
- _createUrl() : Horde_Url
- Create the URL for the keyserver.
- _getKeyIdString() : mixed
Constants
DEFAULT_KEYSERVER
Default keyserver.
public
mixed
DEFAULT_KEYSERVER
= 'http://pool.sks-keyservers.net:11371'
Properties
$_http
HTTP object.
protected
Horde_Http_Client
$_http
$_keyserver
Keyserver hostname.
protected
string
$_keyserver
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Optional parameters:
- http: (Horde_Http_Client) The HTTP client object to use. - keyserver: (string) The public PGP keyserver to use.
Return values
mixed —get()
Returns PGP public key data retrieved from a public keyserver.
public
get(string $id) : Horde_Pgp_Element_PublicKey
Parameters
- $id : string
-
The ID of the PGP key.
Tags
Return values
Horde_Pgp_Element_PublicKey —The PGP public key.
getKeyByEmail()
Returns the first matching key for an email address from a public keyserver.
public
getKeyByEmail(string $address) : Horde_Pgp_Element_PublicKey
Parameters
- $address : string
-
The email address to search for.
Tags
Return values
Horde_Pgp_Element_PublicKey —The PGP public key.
put()
Sends a PGP public key to a public keyserver.
public
put(mixed $key) : mixed
Parameters
- $key : mixed
-
The PGP public key.
Tags
Return values
mixed —_createUrl()
Create the URL for the keyserver.
protected
_createUrl(string $uri[, array<string|int, mixed> $params = array() ]) : Horde_Url
Parameters
- $uri : string
-
Action URI.
- $params : array<string|int, mixed> = array()
-
List of parameters to add to URL.
Return values
Horde_Url —Keyserver URL.
_getKeyIdString()
protected
_getKeyIdString(mixed $keyid) : mixed
Parameters
- $keyid : mixed