GnuPGThis is the main class to use for GPG functions and data
Located in /plugins/gpg/classes/gpg.php (line 383)
array
addSubKey
(string $privatekey, string $passphrase, [ $algo = 3], integer $keysize, $expiredate, integer $type, string $valid)
array
encrypt
(string $body, $send_to_list, [optional $sign = false], [optional $passphrase = false], [optional $filename = ''], [ $signingkeyfpr = false], array $send_to)
void
execute_gpg
(string $options, [string $data = false], [bool $addHomeDir = true], [ $addSystemRing = true])
array
generateKey
( $name, string $email, string $passphrase, [optional $comment = ''], [optional $keylength = 1024], [optional $expiredate = 0], [ $algo = 1], [ $prefs = false], string $real_name)
unknown
generateKey_nopipes
(unknown_type $name, unknown_type $email, unknown_type $passphrase, unknown_type $comment, [unknown_type $keylength = 1024], [unknown_type $expiredate = 0], [unknown_type $prefs = false])
array
sign
([string $data = false], [string $signingKey = false], [ $passphrase = ''], [ $type = 'clear'])
array
signFile
([string $filename = false], [string $passphrase = false], [string $signingKey = false])
array
signKey
(string $signedKeyfpr, [string $signingKeyfpr = false], [string $passphrase = false], [bool $exportsig = true], [bool $revokable = true], [ $uids = ''])
array
signUID
(string $signedKeyfpr, [string $uids = ''], [string $signingKeyfpr = false], [string $passphrase = false], [bool $exportsig = true], [bool $revokable = true])
mixed
$action
= false (line 438)
mixed
$activeKey
= false (line 439)
mixed
$allowEntropyIncrease
= true (line 420)
mixed
$alternateKeyring
= false (line 393)
mixed
$alternateSecretKeyring
= false (line 394)
mixed
$arraykeys
= false (line 434)
mixed
$comment
= '' (line 399)
mixed
$debug
= false (line 385)
mixed
$defaultKeyFingerprint
= '' (line 435)
mixed
$defaultKeyPrefs
= "S2 S7 S3 H2 H3 Z2 Z1" (line 423)
mixed
$encryptKeys
= array() (line 442)
mixed
$error
= false (line 445)
mixed
$errorCode
= '' (line 446)
mixed
$errorDescription
= '' (line 447)
mixed
$fileDescriptors
= array (
mixed
$force_exec
= false (line 387)
mixed
$gpgHomeDir
= "" (line 398)
mixed
$gpg_exe
= "/usr/bin/gpg" (line 396)
mixed
$gpg_options
= "--no-tty --yes --openpgp" (line 397)
mixed
$gpg_pipes
= array() (line 390)
mixed
$indata
= '' (line 389)
mixed
$interactionData
= array() (line 440)
mixed
$invalidRecipients
= array() (line 458)
mixed
$keys
= false (line 433)
mixed
$lang_env_values
= array() (line 417)
mixed
$lang_env_vars
= array('LC_ALL'=>'en_US','LC_LANG'=>'en_US','LC_LANGUAGE'=>'en_US') (line 415)
array
$microtime
= array() (line 463)
mixed
$newKeys
= array() (line 441)
mixed
$newpassphrase
= false (line 403)
mixed
$outdata
= '' (line 389)
mixed
$passphrase
= false (line 402)
mixed
$pipeOpen
= array() (line 391)
mixed
$signedKeyFingerprint
= '' (line 451)
mixed
$signedKeyUserID
= false (line 452)
mixed
$signHashAlgo
= 0 (line 430)
mixed
$signPubKeyAlgo
= 0 (line 430)
mixed
$statusout
= '' (line 404)
mixed
$stderr
= '' (line 404)
mixed
$stdout
= '' (line 404)
string
$stdout_filter
= '' (line 466)
mixed
$systemKeyring
= false (line 392)
mixed
$tempDir
= '' (line 400)
mixed
$tempFileMode
= 0600 (line 401)
mixed
$tmpdir
= '/tmp' (line 426)
mixed
$tmp_locations
= array('/dev/shm', '/dev/mfs', '/tmp', '/var/tmp', 'c:\temp', 'c:\windows\temp', 'c:\winnt\temp') (line 427)
mixed
$trustedKeys
= array() (line 395)
mixed
$verifiedSignature
= false (line 455)
mixed
$verifiedUserID
= false (line 456)
mixed
$verifyStatus
= '' (line 454)
mixed
$writingData
= false (line 460)
addRevoker (line 1096)
Adds a revoking key to a private key
addSubKey (line 1067)
Adds a subkey pair to a main keypair
addTempDir (line 482)
Adds a directory to the end of the list of directories used when attempting to find a writeable temp directory
addUID (line 862)
Adds a UID to a key
changePassphrase (line 1236)
Changes the passphrase on a secret key
clearError (line 3203)
Clears last error
confirmSave (line 1767)
Writes a save command to the GPG command file descriptor
Used during key edit actions
decrypt (line 628)
This function does the decryption.
This is the workhorse of decryption
deleteKey (line 822)
This function deletes a key from the keyring in the homedir It will not remove the key from the keys list, so a refreshkeys is need to reflect the new status of the keyring
deleteSubKey (line 928)
Deletes a subkey pair from a main keypair
deleteUID (line 844)
Deletes a UID from a key
encrypt (line 773)
This function does the encryption This is the workhorse of the encryption side of the plugin
Add code here to use user preferences to modify the gpg command line
execute_gpg (line 2770)
Main function for execute commands with gpg All calls to gpg should be made using this function
expireKey (line 885)
Sets the expiration on a primary key
expireSubKey (line 906)
Sets the expiration on a secondary key
fetchKeys (line 1883)
generateKey (line 956)
This function generates a keypair
Keys created with the option set below are PGP compatible Key-Type: DSA Key-Length: 1024 Subkey-Type: ELG-E Preferences: S2 S7 S3 H2 H3 Z2 Z1 (don't forget to put in the other options needed for actual key creation)
generateKey_nopipes (line 988)
Generates new key without bidi execution functions
getErrorCode (line 3235)
Returns code of last error
getErrorDescription (line 3244)
Returns description of most recent error
getExportText (line 1135)
Exports a key defined by $fpr to ASCII Armored text.
getKey (line 1794)
Retreives a key from the keyring
getKeyIndexFromFingerprint (line 2675)
Retreives a fingerprint based on a key id
getKeyMap_chunked (line 1838)
Returns the map of keys, chunked in to chunks of size <= $len
getKeys (line 1778)
Retreives keys from gpg if no keys have been loaded
Does not force a refresh of the key information
importKey_file (line 2524)
Imports keys from a file into the keyring.
Sets the keys in the keyring to the newly imported/updated keys
importKey_server (line 2561)
Imports a key from ascii-armored keyblock text
importKey_text (line 2542)
Imports a key from ascii-armored keyblock text
increaseEntropy (line 1331)
Runs commands to increase entropy for gpg
definitely needs to be made more robust, currently lists filesystem
isError (line 3213)
Check to see if last action returned an error
list_encrypt_keys (line 581)
lists the encryption keys used for encrypted data
makearrayKeys (line 1819)
Creates an array of keys on the keyring, making use of the arrayKey function
Each key creates an array of data, indexed by fieldname This function is used for keyring sorting and viewing
numKeys (line 1892)
Returns the total number of keys in the object, as determined by options passed to fetchKeys().
parseStatusLine (line 1344)
Parse a line from GnuPG's status file descriptor and act on it
parse_output (line 2086)
This will parse the string that gpg returns for info, warnings, errors and return them in arrays. This function also returns any other output seperately
readStatus (line 1276)
Reads and loops on the status pipe from gpg
Contains the main loop for interaction with gpg with pipes
refreshKeys (line 1903)
Main function for retreiving key and signature information from gpg Parses output from gpg and creates the array of GnuPGKey objects in $this->keys
searchKey_server (line 2591)
Searches for key in keyserver
Output format: array[keyid][time] = integer (pub: line 5th column), unix timestamp [uids] = indexed array with GnuPGuid objects (all uid: lines till next pub:) if keyid is empty, uid: lines were printed before pub: line
setError (line 3222)
Sets error
setHomeDir (line 473)
set the GnuPG home directory
setKeyPassphrase (line 2709)
Sets the passphrase for a secret key identified by its fingerprint or key id
setKeyPrefs (line 1042)
This function generates a keypair
FIXME: really?
setPrimaryUID (line 1115)
Sets the uid number specified as the primary UID
setTempDir (line 494)
set the temporary directory (for very temporary output of files, which are securely overwritten)
sign (line 702)
Clearsigns and ascii-armors passed data with a secret key
signFile (line 658)
Clearsigns and ascii-armors a signature on an external file
signKey (line 1190)
Adds a signature to a public key
The key is signed by the default secret key if no secret key is specified By default the signature is exportable and revocable
signUID (line 1173)
Adds a signature to a specific or multiple uids on a public key The key is signed by the default secret key if no secret key is specified By default the signature is exportable and revocable
sortKeys (line 1861)
Sorts the keys in order of key data name $dataName (e.g. "email_addr", "date", etc) if $asc is true, sorts in ascending order.
update_trustdb (line 753)
This function will update the gpg trustdb for the current user including a scan of the system keyring if enabled
uploadKey (line 1149)
Uploads a public key to a keyserver
verify (line 558)
Verifies an inline signature (clear-text signature)
verifyDetachedSignature (line 505)
Verifies detached signature
verifyFileSignature (line 543)
Verifies file's signature
verifyPassphrase (line 599)
Verifies a passphrase for a secret key The default key is used if no secret key is specified
writeCheckLevel (line 1758)
Writes a confirmation level for signature uid verification query Used during keys signing. Defaults to 0 (Not specified)
writeNewPassword (line 1731)
Writes the new passphrase to the passphrase file descriptor, twice.
writeOkay (line 1747)
Writes a confirmation to the GPG command file descriptor
Used to confirm choices during interaction with the status pipe
writePassword (line 1706)
Writes a password to the passphrase file descriptor
By default writes the passphrase set in the object ($this->passphrase) If not available, writes the passphrase for the fingerprint specified or the passphrase to the default key if no fingerprint if specified
Documentation generated on Sun, 22 Nov 2009 17:36:35 +0200 by phpDocumentor 1.4.3