gpg_functions.php
GPG plugin functions file
Copyright (c) 1999-2005 The SquirrelMail development team Licensed under the GNU GPL. For full terms see the file COPYING.
portions of this file Copyright (c) 1999-2002 the Squirrelmail Development Team
Copyright (c) 2002-2005 Braverock Ventures Copyright (c) 2007 The NaSMail Project
load required functions and config
Creates a temporary directory in the system's temporary directory.
Original Source: Horde.php (class Horde)
Removes given elements at request shutdown.
Original Source: Horde.php (class Horde)
If called with a filename will delete that file at request shutdown; if called with a directory will remove that directory and all files in that directory at request shutdown.
If called with no arguments, return all elements to be deleted (this should only be done by _deleteAtShutdown).
The first time it is called, it initializes the array and registers _deleteAtShutdown() as a shutdown function - no need to do so manually.
The second parameter allows the unregistering of previously registered elements.
Create an HTML TAG Link to display help files This will only create the first half of the A Tag pair
Adds hidden html tags with navigation information
Adds navigation params to url
Adds system trust arguments to gpg execution parameters
Clears the Cached Passphrase from secure storage Overwrite first with gibberish, just in case.
Downloads an entity (part of a message) and returns a temporary filename for it
Prints error boxes
Own error box function is used for better layout controls
Determine the location of the system temporary directory.
If a specific setting cannot be found, it defaults to /tmp
Original Source: Horde.php (class Horde)
Function was renamed in 2.1.nsm in order to avoid name collisions.
Create a temporary filename for the lifetime of the script, and (optionally) register it to be deleted at request shutdown.
Original Source: Horde.php (class Horde)
Function was renamed in 2.1.nsm in order to avoid name collisions.
Get/retrieve the Cached Passphrase from secure storage
This function is called to check whether the user has an SSL connection Returns 0 for false and 1 for true (SSL)
Use whenever you are expecting input from the user (passphrase, etc.)
This function checks all the options to see if passphrase caching is enabled. Returns true if system allows passphrase caching and the user has selected to cache their passphrase Otherwise returns false.
This function checks all the options to see if a cached passphrase should be retrieved. Returns true if system allows passphrase caching and the user has selected to cache their passphrase, and there is a cached passphrase Otherwise returns false.
Creates page title tags
Called by the module pages to display the optional title header.
Function was modified in 2.1.nsm. It returns html tags instead of echoing them
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
FIXME: dupe. See GnuPG::parse_output
Securely delete a temporary file
Should be redundant, as the deleteat shutdown functions should work but just to be sure, and to minimize the time the file is in existence
Function was renamed in 2.1.nsm in order to avoid name collisions.
This function will set a global variable that we want to be available to NaSMail in a fassion that is usable by all of the NaSMail sqgetGlobalVar or other get functions. Place the variable in _SESSION, _POST, and _GET
Sets the Cached Passphrase, storing it in secure storage
Prints all error messages generated during signing and encrypting process
function to strip a gpg: from the beginning of a string, if it exists
This function will update the gpg trustdb for the current user including a scan of the system keyring if enabled
Checks if the passphrase for the given key is valid
This function is used to inialize and return a configured GnuPG object
Documentation generated on Sun, 22 Nov 2009 17:36:36 +0200 by phpDocumentor 1.4.3