summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index b6a436f1..6c1b95c0 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -219,6 +219,17 @@ const char SYMEXPORT *alpm_db_get_name(const alpm_db_t *db)
return db->treename;
}
+/** Get the signature verification level for a database. */
+pgp_verify_t SYMEXPORT alpm_db_get_sigverify_level(alpm_db_t *db)
+{
+ ASSERT(db != NULL, return -1);
+ if(db->pgp_verify == PM_PGP_VERIFY_UNKNOWN) {
+ return alpm_option_get_default_sigverify(db->handle);
+ } else {
+ return db->pgp_verify;
+ }
+}
+
/** Check the validity of a database. */
int SYMEXPORT alpm_db_get_valid(alpm_db_t *db)
{