Paul Schaub
cf1881a140
Fix detection of non-armored data
2021-10-30 15:00:04 +02:00
Paul Schaub
5c3fa28946
Fix Kleopatra Interoperability
...
The cause of this issue was that we skipped the first (proper) PKESK and instead tried to decrypt
the wildcard PKESKs.
Furthermore, we had an issue in MessageInspector which read past the PKESK packets
2021-10-27 13:26:49 +02:00
Paul Schaub
963a8170da
Fix decryption of signed messages created with PGPainless < 0.2.10
2021-10-23 16:44:40 +02:00
Paul Schaub
f05be3dc30
Fix prematurely throwing of MissingPassphraseException
2021-10-19 18:13:23 +02:00
Paul Schaub
2ad917d27c
Add ConsumerOptions.setMissingKeyPassphraseStrategy()
...
This allows switching missing passphrase handling from interactive mode
(fire callbacks to prompt user for missing key passphrases) to non-interactive mode
(throw MissingPassphraseException with all keys with missing passphrase in it).
Fixes #193
2021-10-18 16:01:19 +02:00
Paul Schaub
33f516efe8
Fix detection of signed messages when verification keys are missing
...
Fixes #187 , supersedes #189
2021-10-08 14:03:12 +02:00
Paul Schaub
e390389c0a
Reuse compliance
2021-10-07 16:28:31 +02:00
Paul Schaub
76a0a6479a
Remove unused OPS methods
2021-10-03 14:12:26 +02:00
Paul Schaub
0e1d6cb5a1
Rename DetachedSignature -> DetachedSignatureCheck
2021-10-03 13:47:20 +02:00
Paul Schaub
7bc35dcba3
Add regression test for PGPUtil.getDecoderStream mistaking plaintext for base64 encoded data
2021-10-01 15:21:42 +02:00
Paul Schaub
f7a7035059
Workaround for PGPUtil accidentally mistaking plain data for base64 encoded data.
2021-10-01 15:04:37 +02:00
Paul Schaub
8ec8a55f10
Add ConsumerOptions.setIgnoreMDCErrors()
...
This method can be used to make PGPainless ignore certain MDC related errors or mishabits.
Use of this options is discouraged, but may come in handy in some situations.
Fixes #190
2021-10-01 13:54:51 +02:00
Paul Schaub
1aa6541766
Merge branch 'key_generator_rework'
2021-09-20 14:50:02 +02:00
Paul Schaub
ce645fc429
Postpone decryption of PKESK if secret key passphrase is missing and try next PKESK first before passphrase retrieval using callback
...
Fixes #186
2021-09-15 16:33:03 +02:00
Paul Schaub
21f424551b
Simplify KeySpecBuilder
2021-09-13 19:46:18 +02:00
Paul Schaub
90a00e0541
Move signature verification to dedicated streams
2021-09-07 14:02:07 +02:00
Paul Schaub
ba0e5eb3fe
Improve readability of DecryptionStreamFactory
2021-09-06 17:15:17 +02:00
Paul Schaub
e81ee648d8
Clean DecryptionStream: We only ever have one IntegrityProtectedInputStream at most
2021-09-06 15:14:13 +02:00
Paul Schaub
97c8ff8312
Throw WrongConsumingMethodException when processing Cleartext Signed Messages with Inband Signature verification API and vice versa
2021-08-29 13:35:27 +02:00
Paul Schaub
1124c6fd15
Wip: Configure logback logging
2021-08-26 15:03:20 +02:00
Paul Schaub
200e00990b
Remove unused class and move detached sig initialization in own method
2021-08-23 14:27:02 +02:00
Paul Schaub
829068d5a8
Switch from JUL logging to SLF4J
2021-08-23 14:20:25 +02:00
Paul Schaub
5a9b8a2c50
Verify notBefore and notAfter on any message signatures
2021-08-18 12:55:24 +02:00
Paul Schaub
099b160656
Native support for notBefore and notAfter signature creation time constraints
2021-08-17 14:47:07 +02:00
Paul Schaub
e5b15fe0c2
Use String-formatting in Logger statements
2021-08-15 15:46:41 +02:00
Paul Schaub
fb16db5db4
Improve handling of signatures with missing issuerKeyId packets
2021-07-31 22:24:39 +02:00
Paul Schaub
107e53c03e
Fully drain ArmoredInputStreams to verify CRC checksum.
...
Fixes #159 (for real this time)
2021-07-27 15:09:59 +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
6a90c4303e
OpenPgpMetadat: identify verified sigs by SubkeyIdentifier
2021-07-04 13:08:24 +02:00
Paul Schaub
715d055b41
Add documentation and deprecate old methods
2021-06-15 17:56:36 +02:00
Paul Schaub
8f425cd31d
Fix parsing of non-OpenPGP messages when handling detached signatures
2021-06-15 17:35:58 +02:00
Paul Schaub
70c4dcd1d2
Begin introducing new Decryption API
2021-06-15 17:08:40 +02:00
Paul Schaub
13c7572c8c
Restore functionality of MissingPublicKeyCallback + JUnit test it
2021-05-29 12:19:12 +02:00
Paul Schaub
ea03c66400
Throw MissingDecryptionMethodException when missing decryption key or -passphrase
2021-05-28 23:20:25 +02:00
Paul Schaub
197cfab0d6
Respect symmetric algorithm policy during decryption and throw UnacceptableAlgorithmException if policy is violated
2021-05-17 13:47:46 +02:00
Paul Schaub
5a56949dd7
Throw WrongPassphraseException when wrong passphrase is provided to unlock secret key
2021-05-14 13:18:34 +02:00
Paul Schaub
64cc9ecca4
Proper Signature Verification
2021-04-30 09:49:19 +02:00
Paul Schaub
6ee8a9416f
Prevent decryption of messages using SED instead of SEIP packets and create dedicated exceptions for MDC related errors
2021-04-27 12:27:25 +02:00
Paul Schaub
2c4a3fca6a
Introduce OpenPgpMetadata.FileInfo class for setting/getting file name, mod date, encoding...
2021-04-25 00:28:48 +02:00
Paul Schaub
81393a7285
Abort decryption process at a depth of 16 nested packets
2021-02-19 21:37:54 +01:00
Paul Schaub
ea89289852
Check MDC when stream is closed
2021-02-17 21:04:05 +01:00
Paul Schaub
d2a581de9b
Fix decryption of messages with Wildcard recipient
...
Fixes #76
2021-02-17 20:20:10 +01:00
Paul Schaub
506a8b18af
Reject NULL encryption algorithm when decrypting messages
...
Fixes #77
2021-02-17 20:07:54 +01:00
Paul Schaub
63bf5a8e69
Add support for decryption with hidden recipients
2021-01-09 16:16:17 +01:00
Paul Schaub
1c1f9d49ab
Introduce ImplementationFactory
2020-12-27 01:56:18 +01:00
Paul Schaub
c7ede0fc8a
Add junit test for symmetric decryption
2020-12-26 23:36:33 +01:00
Paul Schaub
7d374f10a7
Allow encryption and decryption using symmetric passphrases in the main API
2020-12-26 19:04:27 +01:00
Paul Schaub
ff8c6d8b6d
Fix NPE when signing key is not found during signature verification
2020-12-16 20:11:45 +01:00
Paul Schaub
65b670740e
Add support for detached signatures
2020-08-24 14:56:42 +02:00
Paul Schaub
2902c81b6c
Simplify integrity protection assignment of resultBuilder
2020-01-10 18:31:27 +01:00