Commit Graph

9 Commits

Author SHA1 Message Date
Paul Schaub de9a161252
Accept certification signatures using SHA-1 before 2023-02-01
This commit introduces a dedicated SignatureHashAlgorithmPolicy for certification signatures.
The default configuration will accept SHA-1 on sigs created before 2023-02-01.
2024-01-04 18:20:09 +01:00
Paul Schaub 03d04fb324 Tests: Replace usages of default algorithm policies with specific policies 2022-11-23 20:42:17 +01:00
Paul Schaub 0690a21360
Increase coverage of Policy class 2022-06-20 18:48:27 +02:00
Paul Schaub 6c983d66e0
Take hash algorithm usage date into account when checking algorithm acceptance 2022-04-22 22:45:39 +02:00
Paul Schaub e390389c0a Reuse compliance 2021-10-07 16:28:31 +02:00
Paul Schaub 21f424551b Simplify KeySpecBuilder 2021-09-13 19:46:18 +02:00
Paul Schaub a65ea26181
Add tests for PublicKeyAlgorithmPolicy 2021-06-11 16:47:22 +02:00
Paul Schaub 5bb4fd3687
Add PublicKeyAlgorithmPolicy to reject weak public keys
BCs PGPPublicKey.getBitStrenght() appears to fail to recognize some elliptic curves.
In such cases, bitStrength is reported as -1.
I added BCUtil.getBitStrength(publicKey) to manually determine the bit strenght by OID.
See https://github.com/bcgit/bc-java/issues/972 for an upstream bug report.
2021-06-11 16:20:29 +02:00
Paul Schaub ed8584df95
Add policy tests 2021-06-10 15:41:44 +02:00