Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/error.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-27 16:29:49 -0500
committerDan McGee <dan@archlinux.org>2011-07-05 10:13:20 -0500
commit7af0ab1cde9398c938a7a221aca5787934a16121 (patch)
tree5c4327bd4c425c05514bd350d5fdda02b361e936 /lib/libalpm/error.c
parent1ce7f39ad73c5c96870c6036014afad3d49a8edf (diff)
signing: move to new signing verification and return scheme
This gives us more granularity than the former Never/Optional/Always trifecta. The frontend still uses these values temporarily but that will be changed in a future patch. * Use 'siglevel' consistenly in method names, 'level' as variable name * The level becomes an enum bitmask value for flexibility * Signature check methods now return a array of status codes rather than a simple integer success/failure value. This allows callers to determine whether things such as an unknown signature are valid. * Specific signature error codes mostly disappear in favor of the above returned status code; pm_errno is now set only to PKG_INVALID_SIG or DB_INVALID_SIG as appropriate. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/error.c')
-rw-r--r--lib/libalpm/error.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 8716109f..7e0e5c85 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -72,6 +72,8 @@ const char SYMEXPORT *alpm_strerror(enum _alpm_errno_t err)
return _("could not find database");
case ALPM_ERR_DB_INVALID:
return _("invalid or corrupted database");
+ case ALPM_ERR_DB_INVALID_SIG:
+ return _("invalid or corrupted database (PGP signature)");
case ALPM_ERR_DB_VERSION:
return _("database is incorrect version");
case ALPM_ERR_DB_WRITE:
@@ -106,7 +108,9 @@ const char SYMEXPORT *alpm_strerror(enum _alpm_errno_t err)
case ALPM_ERR_PKG_IGNORED:
return _("operation cancelled due to ignorepkg");
case ALPM_ERR_PKG_INVALID:
- return _("invalid or corrupted package");
+ return _("invalid or corrupted package (checksum)");
+ case ALPM_ERR_PKG_INVALID_SIG:
+ return _("invalid or corrupted package (PGP signature)");
case ALPM_ERR_PKG_OPEN:
return _("cannot open package file");
case ALPM_ERR_PKG_CANT_REMOVE:
@@ -118,12 +122,10 @@ const char SYMEXPORT *alpm_strerror(enum _alpm_errno_t err)
case ALPM_ERR_PKG_REPO_NOT_FOUND:
return _("could not find repository for target");
/* Signatures */
- case ALPM_ERR_SIG_MISSINGDIR:
- return _("signature directory not configured correctly");
+ case ALPM_ERR_SIG_MISSING:
+ return _("missing PGP signature");
case ALPM_ERR_SIG_INVALID:
return _("invalid PGP signature");
- case ALPM_ERR_SIG_UNKNOWN:
- return _("unknown PGP signature");
/* Deltas */
case ALPM_ERR_DLT_INVALID:
return _("invalid or corrupted delta");