mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-27 06:42:05 +01:00
KeyRingBuilder: Do not info-log exception when generated key has wrong length
This commit is contained in:
parent
892f452da8
commit
32e1b0c838
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue