Skip to main content

Module pgp

Module pgp 

Source
Expand description

PGP signature verification.

Structs§

KeyInfo
A structure holding a PGP key’s name and its parsed certificate.

Statics§

BUILTIN_KEYS
A list of built-in PGP keys for registry and package verification.

Functions§

add_key_from_bytes
Adds a PGP key from a byte slice to the local keyring.
add_key_from_fingerprint
Fetches a PGP key from a keyserver by fingerprint and adds it to the local keyring.
add_key_from_path
Imports a PGP key from a file path into the local keyring.
add_key_from_url
Downloads a PGP key from a URL and adds it to the local keyring.
cli_verify_signature
A CLI-friendly wrapper for verifying a file’s signature using a named key from the local keyring.
ensure_builtin_keys
Synchronizes the local keyring with trusted keys embedded in the Zoi binary.
get_all_local_certs
Retrieves all PGP certificates stored in the local keyring.
get_all_local_keys_info
Retrieves information for all PGP keys stored in the local keyring.
get_cert_status
Returns a human-readable string representing the status of a PGP certificate.
get_certs_by_name_or_fingerprint
Resolves a list of names or fingerprints to PGP certificates from the local keyring.
get_pgp_dir
Returns the path to the local PGP keyring directory.
list_keys
Prints a formatted list of all PGP keys stored in the local keyring.
remove_key_by_fingerprint
Searches for and removes a PGP key from the local keyring by its fingerprint.
remove_key_by_name
Removes a PGP key from the local keyring by its name.
search_keys
Searches for PGP keys in the local keyring by name, fingerprint, or UserID (name/email).
show_key
Prints the ASCII-armored content of a PGP key from the local keyring.
sign_detached
Signs a file using GnuPG.
validate_cert
Validates a PGP certificate, checking for revocation and expiration.
verify_detached_signature
Verifies a detached PGP signature for a file using a specific certificate.
verify_detached_signature_multi_key
Verifies a detached PGP signature for a file against a set of trusted certificates.
verify_detached_signature_raw
Verifies a detached PGP signature for raw data using a specific certificate.