1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-23 12:52:07 +01:00

KeyRingBuilder: Do not info-log exception when generated key has wrong length

This commit is contained in:
Paul Schaub 2021-05-12 12:56:07 +02:00
parent 892f452da8
commit 32e1b0c838
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -489,7 +489,8 @@ public class KeyRingBuilder implements KeyRingBuilderInterface {
} catch (PGPException e) { } catch (PGPException e) {
// When generating EdDSA keys, the private key has an encoding length of 33 instead of 34, which results // When generating EdDSA keys, the private key has an encoding length of 33 instead of 34, which results
// in an exception. Therefore we just try again as a workaround. // in an exception. Therefore we just try again as a workaround.
LOGGER.log(Level.INFO, "Private key has wrong length. Try again.", e); LOGGER.log(Level.INFO, "Generated private key encoding has incorrect length. Trying again.");
LOGGER.log(Level.FINER, "Incorrect private key encoding length is caused by a bug in Bouncycastle. See https://github.com/bcgit/bc-java/issues/887", e);
pgpKeyPair = generateKeyPair(spec); pgpKeyPair = generateKeyPair(spec);
} }
return pgpKeyPair; return pgpKeyPair;