Change signature opts to include type, cleanup error handling
Previously we would pass the `verification-key` and `verification-file` to all backends, ignoring errors from loading keys until we found one that worked. Instead, change the options to be `verification-<engine>-key` and `verification-<engine>-file`, and then rework this to use standard error handling; barf explicitly if we can't load the public keys for example. Preserve the semantics of accepting the first valid signature. The first signature error is captured, the others are currently compressed into a `(and %d more)` prefix. And now that I look at this more closely there's a lot of duplication between the two code paths in pull.c for verifying; will dedup this next.
This commit is contained in:
1 parent
fd55deb0f7
commit
8e7aea4473
5 files changed
+106
-74
No files matched your search
@@ -242,7 +242,7 @@ gboolean ostree_sign_ed25519_data_verify (OstreeSign *self,
|
||||
}
|
||||
}
|
||||
|
||||
return glnx_throw (error, "Not able to verify: no valid signatures found");
|
||||
return glnx_throw (error, "no valid ed25519 signatures found");
|
||||
#endif /* HAVE_LIBSODIUM */
|
||||
|
||||
return FALSE;
|
||||
|
||||
Reference in new issue
Block a user