libalpm_sig(3)
πΈ libalpm_sig(3) β Library Functions Manual πΈ
okay so bestie, this is the signature-checking page from libalpm. Itβs giving βtrust, but verifyβ and we are gonna verify everything π β¨
π NAME π
libalpm_sig β Signature checking
- Functions to check signatures
β¨ SYNOPSIS β¨
π¦ Data Structures π¦
struct alpm_pgpkey_tβ A PGP key.struct alpm_sigresult_tβ Signature result.struct alpm_siglist_tβ Signature list.
π’ Enumerations π’
enum alpm_siglevel_t { ALPM_SIG_PACKAGE = (1 << 0),
ALPM_SIG_PACKAGE_OPTIONAL = (1 << 1), ALPM_SIG_PACKAGE_MARGINAL_OK =
(1 << 2), ALPM_SIG_PACKAGE_UNKNOWN_OK = (1 << 3), ALPM_SIG_DATABASE
= (1 << 10), ALPM_SIG_DATABASE_OPTIONAL = (1 << 11),
ALPM_SIG_DATABASE_MARGINAL_OK = (1 << 12),
ALPM_SIG_DATABASE_UNKNOWN_OK = (1 << 13), ALPM_SIG_USE_DEFAULT = (1
<< 30) }
enum alpm_sigstatus_t { ALPM_SIGSTATUS_VALID,
ALPM_SIGSTATUS_KEY_EXPIRED, ALPM_SIGSTATUS_SIG_EXPIRED,
ALPM_SIGSTATUS_KEY_UNKNOWN, ALPM_SIGSTATUS_KEY_DISABLED,
ALPM_SIGSTATUS_INVALID }
enum alpm_sigvalidity_t { ALPM_SIGVALIDITY_FULL,
ALPM_SIGVALIDITY_MARGINAL, ALPM_SIGVALIDITY_NEVER,
ALPM_SIGVALIDITY_UNKNOWN }
enum alpm_siglevel_tβ PGP signature verification options.enum alpm_sigstatus_tβ PGP signature verification status return codes.enum alpm_sigvalidity_tβ The trust level of a PGP key.
π οΈ Functions π οΈ
int alpm_pkg_check_pgp_signature (alpm_pkg_t *pkg, alpm_siglist_t
*siglist)
int alpm_db_check_pgp_signature (alpm_db_t *db, alpm_siglist_t *siglist)
int alpm_siglist_cleanup (alpm_siglist_t *siglist)
int alpm_decode_signature (const char *base64_data, unsigned char
**data, size_t *data_len)
int alpm_extract_keyid (alpm_handle_t *handle, const char *identifier,
const unsigned char *sig, const size_t len, alpm_list_t **keys)
alpm_pkg_check_pgp_signatureβ Check the PGP signature for the given package file.alpm_db_check_pgp_signatureβ Check the PGP signature for the given database.alpm_siglist_cleanupβ Clean up and free a signature result list.alpm_decode_signatureβ Decode a loaded signature in base64 form.alpm_extract_keyidβ Extract the Issuer Key ID from a signature.
π¬ Detailed Description π¬
Functions to check signatures. Thatβs the whole vibe. π«Ά
π§Έ Data Structure Documentation π§Έ
struct alpm_pgpkey_t β A PGP key.
Data Fields:
alpm_time_t createdβ When the key was created.void * dataβ The actual key data.char * emailβ Email of the keyβs owner.alpm_time_t expiresβ When the key expires.char * fingerprintβ The keyβs fingerprint.unsigned int lengthβ The length of the key.char * nameβ Name of the keyβs owner.char pubkey_algoβ A character representing the encryption algorithm used by the public key.? = unknown R = RSA D = DSA E = EDDSAunsigned int revokedβ has the key been revokedchar * uidβ UID of the key.
struct alpm_sigresult_t β Signature result.
Contains the key, status, and validity of a given signature. π
Data Fields:
alpm_pgpkey_t keyβ The key of the signature.alpm_sigstatus_t statusβ The status of the signature.alpm_sigvalidity_t validityβ The validity of the signature.
struct alpm_siglist_t β Signature list.
Contains the number of signatures found and a pointer to an array of results. The array is of size count. π
Data Fields:
size_t countβ The amount of results in the array.alpm_sigresult_t * resultsβ An array of sigresults.
π Enumeration Type Documentation π
enum alpm_siglevel_t β PGP signature verification options.
Enumerator
ALPM_SIG_PACKAGEβ Packages require a signature.ALPM_SIG_PACKAGE_OPTIONALβ Packages do not require a signature, but check packages that do have signatures.ALPM_SIG_PACKAGE_MARGINAL_OKβ itβs in the enum values above; the original enumerator docs donβt give it its own description, bestie πALPM_SIG_PACKAGE_UNKNOWN_OKβ Allow packages with signatures that are unknown trust.ALPM_SIG_DATABASEβ Databases require a signature.ALPM_SIG_DATABASE_OPTIONALβ Databases do not require a signature, but check databases that do have signatures.ALPM_SIG_DATABASE_MARGINAL_OKβ Allow databases with signatures that are marginal trust.ALPM_SIG_DATABASE_UNKNOWN_OKβ Allow databases with signatures that are unknown trust.ALPM_SIG_USE_DEFAULTβ The Default siglevel.
enum alpm_sigstatus_t β PGP signature verification status return codes.
Enumerator
ALPM_SIGSTATUS_VALIDβ Signature is valid.ALPM_SIGSTATUS_KEY_EXPIREDβ The key has expired.ALPM_SIGSTATUS_SIG_EXPIREDβ The signature has expired.ALPM_SIGSTATUS_KEY_UNKNOWNβ The key is not in the keyring.ALPM_SIGSTATUS_KEY_DISABLEDβ The key has been disabled.ALPM_SIGSTATUS_INVALIDβ The signature is invalid.
enum alpm_sigvalidity_t β The trust level of a PGP key.
Enumerator
ALPM_SIGVALIDITY_FULLβ The signature is fully trusted.ALPM_SIGVALIDITY_MARGINALβ The signature is marginally trusted.ALPM_SIGVALIDITY_NEVERβ The signature is never trusted.ALPM_SIGVALIDITY_UNKNOWNβ The signature has unknown trust.
π οΈ Function Documentation π οΈ
int alpm_db_check_pgp_signature (alpm_db_t * db, alpm_siglist_t * siglist)
Check the PGP signature for the given database.
Parameters:
dbβ the database to checksiglistβ a pointer to storage for signature results
Returns: 0 if valid, -1 if an error occurred or signature is invalid
int alpm_decode_signature (const char * base64_data, unsigned char ** data, size_t * data_len)
Decode a loaded signature in base64 form.
Parameters:
base64_dataβ the signature to attempt to decodedataβ the decoded data; must be freed by the callerdata_lenβ the length of the returned data
Returns: 0 on success, -1 on failure to properly decode
int alpm_extract_keyid (alpm_handle_t * handle, const char * identifier, const unsigned char * sig, const size_t len, alpm_list_t ** keys)
Extract the Issuer Key ID from a signature.
Parameters:
handleβ the context handleidentifierβ the identifier of the key. This may be the name of the package or the path to the package.sigβ PGP signaturelenβ length of signaturekeysβ a pointer to storage for key IDs
Returns: 0 on success, -1 on error
int alpm_pkg_check_pgp_signature (alpm_pkg_t * pkg, alpm_siglist_t * siglist)
Check the PGP signature for the given package file.
Parameters:
pkgβ the package to checksiglistβ a pointer to storage for signature results
Returns: 0 if valid, -1 if an error occurred or signature is invalid
int alpm_siglist_cleanup (alpm_siglist_t * siglist)
Clean up and free a signature result list. Important: this does not free the siglist object itself in case that was allocated on the stack; this is the responsibility of the caller. π«Ά
Parameters:
siglistβ a pointer to storage for signature results
Returns: 0 on success, -1 on error
βοΈ Author βοΈ
Generated automatically by Doxygen for libalpm from the source code.
source/version: libalpm Β· page: libalpm_sig(3) Β· date: the footer didnβt list one, so weβre not inventing it, bestie ππ
π¦ where this page comes from
- epel 10: libalpm-devel 7.0.0-5.el10_2 Β· GPL-2.0-or-later
- fedora 43: libalpm-devel 7.0.0-5.fc43 Β· GPL-2.0-or-later
- fedora 43: libalpm-devel 7.0.0-5.fc43 Β· GPL-2.0-or-later
- fedora 44: libalpm-devel 7.0.0-6.fc44 Β· GPL-2.0-or-later
- fedora 44: libalpm-devel 7.0.0-6.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms