l.s.g.h.GPGHandler : class documentation

Part of lp.services.gpg.handler View In Hierarchy

See IGPGHandler.
Method __init__ Initialize environment variable.
Method sanitizeFingerprint See IGPGHandler.
Method resetLocalState See IGPGHandler.
Method getVerifiedSignatureResilient See IGPGHandler.
Method getVerifiedSignature See IGPGHandler.
Method importPublicKey See IGPGHandler.
Method importSecretKey See IGPGHandler.
Method generateKey See IGPGHandler.
Method encryptContent See IGPGHandler.
Method signContent See IGPGHandler.
Method localKeys Get an iterator of the keys this gpg handler
Method retrieveKey See IGPGHandler.
Method retrieveActiveKey See IGPGHandler.
Method uploadPublicKey See IGPGHandler
Method getURLForKeyInServer See IGPGHandler
Method _setNewHome Create a new directory containing the required configuration.
Method _rawVerifySignature Internals of getVerifiedSignature.
Method _submitKey Submit an ASCII-armored public key export to the keyserver.
Method _getPubKey See IGPGHandler for further information.
Method _grabPage Wrapper to collect KeyServer Pages.
def __init__(self):
Initialize environment variable.
def _setNewHome(self):
Create a new directory containing the required configuration.

This method is called inside the class constructor and genereates a new directory (name randomly generated with the 'gpg-' prefix) containing the proper file configuration and options.

Also installs an atexit handler to remove the directory on normal process termination.

def sanitizeFingerprint(self, fingerprint):
See IGPGHandler.
def resetLocalState(self):
See IGPGHandler.
def getVerifiedSignatureResilient(self, content, signature=None):
See IGPGHandler.
def _rawVerifySignature(self, ctx, content, signature=None):
Internals of getVerifiedSignature.

This is called twice during a typical verification: once to work out the correct fingerprint, and once after retrieving the corresponding key from the keyserver.

def getVerifiedSignature(self, content, signature=None):
See IGPGHandler.
def importPublicKey(self, content):
See IGPGHandler.
def importSecretKey(self, content):
See IGPGHandler.
def generateKey(self, name):
See IGPGHandler.
def encryptContent(self, content, key):
See IGPGHandler.
def signContent(self, content, key, password='', mode=None):
See IGPGHandler.
def localKeys(self, filter=None, secret=False):
Get an iterator of the keys this gpg handler already knows about.
def retrieveKey(self, fingerprint):
See IGPGHandler.
def retrieveActiveKey(self, fingerprint):
See IGPGHandler.
def _submitKey(self, content):
Submit an ASCII-armored public key export to the keyserver.

It issues a POST at /pks/add on the keyserver specified in the configuration.

def uploadPublicKey(self, fingerprint, logger=None):
See IGPGHandler
def getURLForKeyInServer(self, fingerprint, action='index', public=False):
See IGPGHandler
def _getPubKey(self, fingerprint):
See IGPGHandler for further information.
def _grabPage(self, action, fingerprint):
Wrapper to collect KeyServer Pages.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.