Commit Graph

80 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 f3ea9f62e1
Kotlin conversion: EncryptionOptions 2023-10-09 12:44:21 +02:00
Paul Schaub 1a701333e3
Remove deprecated OpenPgpMetadata class 2023-10-09 12:29:33 +02:00
Paul Schaub 16a4836f8a
Override evaluation date in test with expiring key 2023-08-03 14:51:43 +02:00
Paul Schaub 975d59c5a9
Add method to allow for encryption for keys with missing keyflags.
There are legacy keys around, which do not carry any key flags.
This commit adds a method to EncryptionOptions that allow PGPainless to encrypt
for such keys.

Fixes #400
2023-08-03 14:04:40 +02:00
Paul Schaub 6b145475a8
Add test for anonymous recipients 2023-06-15 14:28:56 +02:00
Paul Schaub 1fca51d771
SigningOptions: Add methods to sign with a single, chosen signing subkey 2023-06-08 14:04:06 +02:00
Paul Schaub 41e663e25b
Allow setting custom version header when encrypting/signing message 2023-06-05 20:18:06 +02:00
Paul Schaub 92a5e559f8
Earlier catching of NPEs in tests 2023-05-03 17:26:21 +02:00
Paul Schaub 64c6d7a904
Annotate EncryptionOptions methods with @Nonnull 2023-05-03 14:38:52 +02:00
Paul Schaub 8cb773841b
Revert certificate-store integration
Integration of certificate-store and pgpainless-cert-d makes packaging
complicated. Alternatively, users can simply integrate the certificate-store
with PGPainless themselves.
2023-01-13 19:18:02 +01:00
Paul Schaub 8f6227c14b Rework some tests to use MessageMetadata 2022-11-23 20:42:54 +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 4594b494a9 Implement signature verification with certificate stores as cert source 2022-11-23 20:42:17 +01:00
Paul Schaub 22abb62443 Add test for encryption to cert from certificate store 2022-11-23 20:42:17 +01:00
Paul Schaub 09f94944b3 Remove unnecessary throws declarations 2022-11-23 20:40:03 +01:00
Paul Schaub 754fcf72a1
Implement ProducerOptions.setHideArmorHeaders()
Fixes #328
2022-10-31 11:43:24 +01:00
Paul Schaub dd26b5230d Use newly introduced modernKeyRing(userId) method 2022-06-19 16:59:42 +02:00
Paul Schaub b980fcd7b1
EncryptionOptions.addRecipients(collection): Disallow empty collections
Fixes #281
2022-04-29 22:49:45 +02:00
Paul Schaub 73b7f1b9bb
Refactoring 2022-04-19 21:07:46 +02:00
Paul Schaub a22336a795 Create dedicated KeyException class for key-related exceptions. 2022-04-07 19:42:58 +02:00
Paul Schaub 9de196d6c5 Fix test for algorithm preference extraction 2022-01-15 02:45:10 +01:00
Paul Schaub ce7b69269b
Various code cleanup 2021-12-28 13:32:50 +01:00
Paul Schaub cf90c25afc
rename invocationContextProvider to TestAllImplementations 2021-12-14 16:56:29 +01:00
Paul Schaub c331dee6b1
Replace @ArgumentSource with @TestTemplate, @ExtendWith 2021-12-14 16:55:04 +01:00
Paul Schaub 2ebf4be39c
Replace @MethodSource annotation with @ArgumentsSource 2021-12-14 15:47:53 +01:00
Paul Schaub 27c4fd240d
Improve test for preferred sym algs 2021-11-27 17:03:17 +01:00
Paul Schaub d670b5ee07
Fix test 2021-11-27 16:15:50 +01:00
Paul Schaub 91080f411d
Rework secret key protection 2021-11-20 20:19:22 +01:00
Paul Schaub 03a350d279
Separate key generation from scratch and from templates in to buildKeyRing() and generateKeyRing() 2021-11-02 12:23:05 +01:00
Paul Schaub e390389c0a Reuse compliance 2021-10-07 16:28:31 +02:00
Paul Schaub 5d28823c80
Add more signing tests 2021-10-04 14:21:06 +02:00
Paul Schaub be47a96030
Further simplify the KeyRingBuilder API 2021-09-20 12:30:03 +02:00
Paul Schaub 21f424551b Simplify KeySpecBuilder 2021-09-13 19:46:18 +02:00
Paul Schaub 1ce6632f18 Rename KeyValidationException -> KeyValidationError 2021-08-15 15:46:41 +02:00
Paul Schaub 9a485a3354
Encrypt to all capable subkeys by default 2021-08-04 16:38:17 +02:00
Paul Schaub 311c842196
Revert introduction of StreamUtil 2021-07-31 20:40:31 +02:00
Paul Schaub fc311fe781
Workaround for #159: Avoid to prevent swallowing IOExceptions 2021-07-26 16:19:30 +02:00
Paul Schaub 8cf5347b52 Base PGPainlessCLI on new sop-java module
* Rename pgpainless-sop -> pgpainless-cli
* Introduce sop-java (implementation-independent SOP API)
* Introduce sop-java-picocli (CLI frontend for sop-java)
* Introduce pgpainless-sop (implementation of sop-java using PGPainless)
* Rework pgpainless-cli (plugs pgpainless-sop into sop-java-picocli)
2021-07-15 17:03:56 +02:00
Paul Schaub 2ba782c451
Move file-related encryption-info into ProducerOptions 2021-07-10 12:22:47 +02:00
Paul Schaub 63c75f1f86
Rename TestUtil -> TestImplementationFactoryProvider 2021-07-03 12:42:12 +02:00
Paul Schaub 9b046a0cf1
Change SymmetricEncryptionAlgorithmNegotiator to return the 'best' avail. alg 2021-07-01 21:33:38 +02:00
Paul Schaub b6eed91f47
Remove deprecated encryption API 2021-06-29 16:43:37 +02:00
Paul Schaub 3c37072774
Remove unused Selection classes 2021-06-23 19:33:13 +02:00
Paul Schaub 88891e1337
Remove usage of deprecated decryption/verification API in tests 2021-06-16 15:38:02 +02:00
Paul Schaub 7696f120e6
Even more EncryptionOptions tests 2021-06-10 15:18:31 +02:00
Paul Schaub 762d9d4803
More EncryptionOptions tests 2021-06-10 15:04:21 +02:00
Paul Schaub 512825aad4
Add test for EncryptionOptions 2021-06-10 14:25:00 +02:00
Paul Schaub 845779d40b
Avoid deprecated methods 2021-06-10 12:42:03 +02:00
Paul Schaub 1a5baa0fa4
Clean up BCUtils class 2021-05-29 12:43:31 +02:00