class documentation
class GPGCliSignatureVendor(SignatureSigner, SignatureVerifier):
Constructors: GPGCliSignatureVendor.from_config(config, keyids), GPGCliSignatureVendor(gpg_command, keyids)
Signature vendor that uses the GPG command-line tool for signing and verification.
| Class Method | available |
Check if the gpg command is available. |
| Class Method | from |
Create a GPG CLI vendor from git configuration. |
| Method | __init__ |
Initialize the GPG CLI vendor. |
| Method | sign |
Sign data with a GPG key using the command-line tool. |
| Method | verify |
Verify a GPG signature using the command-line tool. |
| Instance Variable | gpg |
Undocumented |
Inherited from SignatureVerifier (via SignatureSigner):
| Instance Variable | keyids |
Undocumented |
overrides
dulwich.signature.SignatureSigner.signSign data with a GPG key using the command-line tool.
| Parameters | |
data:bytes | The data to sign |
keyid:str | None | Optional GPG key ID to use for signing. If not specified, the default GPG key will be used. |
| Returns | |
bytes | The signature as bytes |
| Raises | |
subprocess.CalledProcessError | if GPG command fails |
Verify a GPG signature using the command-line tool.
| Parameters | |
data:bytes | The data that was signed |
signature:bytes | The signature to verify |
| Raises | |
BadSignature | if GPG signature verification fails |
UntrustedSignature | if signature was not created by a trusted key |