Paul Schaub
311c842196
Revert introduction of StreamUtil
2021-07-31 20:40:31 +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
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
63c75f1f86
Rename TestUtil -> TestImplementationFactoryProvider
2021-07-03 12:42:12 +02:00
Paul Schaub
9ac4b30ec7
Delete unused NonEmptyList class
2021-07-03 12:24:08 +02:00
Paul Schaub
c8a281d6a4
Move UTC timestamp methods to DateUtil class
2021-07-03 12:23:24 +02:00
Paul Schaub
dff47d17d1
Remove more unused methods and fix method name
2021-06-28 21:14:40 +02:00
Paul Schaub
259f629b3c
Further deletion of unused selection classes
2021-06-23 19:39:10 +02:00
Paul Schaub
3c37072774
Remove unused Selection classes
2021-06-23 19:33:13 +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
9b9064beae
Small code style fixes and optimizations
2021-06-10 12:42:48 +02:00
Paul Schaub
82536eaa77
Improve support for PGP[Secret|Public]KeyRingCollections
2021-05-29 13:52:29 +02:00
Paul Schaub
1a5baa0fa4
Clean up BCUtils class
2021-05-29 12:43:31 +02:00
Paul Schaub
6f0cf35e31
Delete redundant classes
2021-05-28 21:33:20 +02:00
Paul Schaub
1550e4ff4e
Delete SelectPublicKey
2021-05-25 14:24:47 +02:00
Paul Schaub
6cb9091b2a
Work on signaturePicker
2021-05-25 14:24:16 +02:00
Paul Schaub
7e2c89b1b3
Trim passphrases
2021-05-20 12:41:51 +02:00
Paul Schaub
14ff0e9cc5
ArmorUtils: Add support for messageIds
2021-05-15 16:24:01 +02:00
Paul Schaub
b05f6887bd
Better support for Armor headers
2021-05-15 15:57:42 +02:00
Paul Schaub
892f452da8
Print fingerprint+user-id in comment headers of Armor
2021-05-08 14:02:44 +02:00
Paul Schaub
ec85f53bb6
Incorporate feedback from @IvanPizhenko. Thanks!
2021-04-30 10:23:12 +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
Den
491ab93c41
Modified Passphrase.fromPassword() to fit Kotlin needs ( #101 )
...
* Added @Nonnull annotation to Passphrase.fromPassword()
2021-04-10 14:32:24 +02:00
Paul Schaub
bfab4b60f0
Introduce parametrized tests to also test the JceImplementationFactory
2021-02-25 23:27:08 +01:00
Paul Schaub
577ee143b5
Add NotationRegistryTest
2021-02-25 19:57:18 +01:00
Paul Schaub
217609679d
Add SignatureValidationUtil and NotationRegistry classes
2021-02-19 21:22:25 +01:00
Paul Schaub
c75a192513
Use ArmoredOutputStreamFactory to hide version string in ascii armor
...
Partially fixes #82
2021-02-19 19:50:36 +01:00
Paul Schaub
ea89289852
Check MDC when stream is closed
2021-02-17 21:04:05 +01:00
Paul Schaub
ebf46fa05e
Add tests for SelectUserId
2021-02-07 03:12:59 +01:00
Paul Schaub
567291ac17
Rename UserIdSelectionStrategy -> SelectUserId
2021-02-03 16:38:28 +01:00
Paul Schaub
449881bd8d
Add deleteUserIds(keyId, userIdSelectionStrategy, protector) method to SecretKeyRingEditor
2021-02-03 16:26:15 +01:00
Paul Schaub
eaee5a27fc
Move selection strategies to util package and implement UserIdSelectionStrategy
2021-02-03 16:05:21 +01:00
Paul Schaub
4ddbca4908
Expose keySpec.getSubpacketGenerator() and move setPrimaryUserId to builder
2021-01-29 14:51:24 +01:00
Paul Schaub
bec2fb5ce1
Increase test coverage by writing bunch of JUnit tests
2021-01-22 20:03:20 +01:00
Paul Schaub
c35154813a
More code cleanup and tests
2021-01-21 14:35:33 +01:00
Paul Schaub
bd9a580600
Remove unused BCUtil.publicKeyRingFromSecretKeyRing method
...
Use KeyRingUtils.publicKeyRingFrom(secertKeys) instead
2021-01-21 14:33:52 +01:00
Paul Schaub
21ba97c598
Add SubpacketInspector and SignatureSubpacketGeneratorUtil classes
2021-01-18 17:08:52 +01:00
Paul Schaub
83bd157a78
Get rid of generics in selection strategies
2021-01-09 19:23:50 +01:00
Paul Schaub
1c1f9d49ab
Introduce ImplementationFactory
2020-12-27 01:56:18 +01:00
Paul Schaub
0edd8b616f
Add support for creating detached revocation certificates
2020-11-20 12:01:39 +01:00
Paul Schaub
9f95e7925b
De-duplicate KeyPrinter class
2020-11-18 12:20:59 +01:00
Paul Schaub
8097a9d964
Passphrase.isEmpty: also check for validity
2020-10-30 12:31:52 +01:00
Wiktor Kwapisiewicz
59fe53c594
Fix creating keys with Passphrase.emptyPassphrase()
...
Previously the code supplied `null` to BouncyCastle's
encryptor/decryptor builder's build method and that caused
NullPointerException to be thrown.
The fix checks if the passphrase is empty and omits the BouncyCastle
builder in that case.
Fixes #16 .
2020-10-30 12:22:05 +01:00
Paul Schaub
cdd1bf4198
Add documentation and throw NotYetImplementedException in stubs
2020-10-29 15:15:13 +01:00
Paul Schaub
623c4c930d
Adding user-ids works
2020-10-25 19:54:03 +01:00
Paul Schaub
20f32926bb
Add Passphrase.fromPassword() and PasswordBasedSecretKeyRingProtector.forKey() factory methods
2020-08-31 12:26:07 +02:00
Paul Schaub
cbb9b00b88
Rename KeyFlag.fromInteger -> fromBitmask
2020-01-09 20:53:46 +01:00
Paul Schaub
6679c1bf3f
Passphrase.java do not use deprecated finalize()
2020-01-09 19:06:48 +01:00