mirror of
https://github.com/google/nomulus
synced 2026-02-04 12:02:30 +00:00
Partially fix errors when using DummyKeyringModule
This fixes a few problems encountered when building and running according to the Install Guide using the DummyKeyring. It's still failing when trying to parse the JSON credential, which I haven't solved, but before proceeding I wanted to get agreement that it needs to be fixed at all since the best we could do is provide a valid format (as with the PGP keyrings), but the metrics logging will still fail for a different reason (i.e. the credential will not work for the GC project). Things fixed in this PR: Fix format string causing MissingFormatArgumentException in FrontendServlet when keyring fails to load. Include exception cause in VerifyException in PgpHelper. Replace dummy PGP keyrings with ones without a password, as code expects. Document how the PGP keyrings are created. P.S. I see a tab character snuck into PgpHelper. I'll fix that if you're interested in this PR. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=188342973
This commit is contained in:
@@ -117,7 +117,7 @@ public final class PgpHelper {
|
||||
new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider())
|
||||
.build(new char[0]));
|
||||
} catch (PGPException e) {
|
||||
throw new VerifyException(e.getMessage());
|
||||
throw new VerifyException(String.format("Could not load PGP private key for: %s", query), e);
|
||||
}
|
||||
return new PGPKeyPair(publicKey, privateKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user