Package zeroinstall :: Package injector :: Module gpg
[frames] | no frames]

Module gpg

source code

Python interface to GnuPG.

This module is used to invoke GnuPG to check the digital signatures on interfaces.


See Also: iface_cache.PendingFeed

Classes
  Signature
Abstract base class for signature check results.
  ValidSig
A valid signature check result.
  BadSig
A bad signature (doesn't match the message).
  ErrSig
Error while checking a signature.
  Key
A GPG key.
Functions
{str: Key}
load_keys(fingerprints)
Load a set of keys at once.
source code
Key
load_key(fingerprint)
Query gpg for information about this key.
source code
 
import_key(stream)
Run gpg --import with this stream as stdin.
source code
(file, [Signature])
check_stream(stream)
Verify the GPG signature at the end of stream.
source code
Function Details

load_keys(fingerprints)

source code 

Load a set of keys at once. This is much more efficient than making individual calls to load_key.

Parameters:
  • fingerprints ([str])
Returns: {str: Key}
a list of loaded keys, indexed by fingerprint

Since: 0.27

load_key(fingerprint)

source code 

Query gpg for information about this key.

Returns: Key
a new key

Since: 0.27

import_key(stream)

source code 

Run gpg --import with this stream as stdin.

Parameters:
  • stream (file)

check_stream(stream)

source code 

Verify the GPG signature at the end of stream. stream must be seekable.

Parameters:
  • stream (file)
Returns: (file, [Signature])
(stream, [Signatures])