1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-23 20:14:49 +02:00
Commit graph

145 commits

Author SHA1 Message Date
Paul Schaub ae6a427d90
Add test for UniversalSignatureBuilder 2022-11-25 15:34:54 +01:00
Paul Schaub d3f07a2250 Reuse *SignatureCheck class 2022-11-23 20:40:40 +01:00
Paul Schaub c253732ad9 Do not reject bnacksig signatures when they predate subkey binding date
Fixes #334
2022-11-09 15:44:20 +01:00
Paul Schaub 50d18a4581 Fix NPE when validating signature made by key without keyflags on direct key sigature
(Presumably) fixes #332
2022-11-07 15:34:18 +01:00
Paul Schaub b02ae86ff6 Annotate SignatureSubpacketsUtil methods with @Nullable and @Nonnull 2022-11-07 15:34:18 +01:00
Paul Schaub c3dc3c9d87 Allow modification of keys with custom reference date
Also, bind subkeys using SubkeyBindingSignatureBuilder
2022-09-03 13:42:58 +02:00
Paul Schaub c6676d3c91
Add support for generating keys without user-ids
Fixes #296
2022-08-29 14:12:02 +02:00
Paul Schaub 1b04d67e1a
Remove unused SignatureSubpacketGeneratorUtil class and tests 2022-08-29 11:30:26 +02:00
Paul Schaub b8f4cc3935 Merge branch 'certification' 2022-06-29 16:01:03 +02:00
Paul Schaub 7e0b1b344c
s/{validation|evaluation}Date/referenceTime/g 2022-06-24 12:47:35 +02:00
Paul Schaub d2b48e83d9 Implement certifying of certifications 2022-06-20 12:44:40 +02:00
Paul Schaub fa5ddfd112 WIP: Implement delegations
THERE ARE THINGS BROKEN NOW. DO NOT MERGE!
2022-06-20 12:44:40 +02:00
Paul Schaub 444ec6d593
Add documentation to enforceBounds() 2022-06-01 13:40:07 +02:00
Paul Schaub 44c32d0620
When setting expiration dates: Prevent integer overflow 2022-06-01 13:36:00 +02:00
Paul Schaub 70a861611c
Improve SignatureUtils.wasIssuedBy() by adding support for v5 fingerprints 2022-05-18 14:21:22 +02:00
Paul Schaub 1a37058c66 Add SignatureUtils.getSignaturesForUserIdBy(key, userId, keyId) 2022-05-17 18:38:48 +02:00
Paul Schaub 8fd67da973
Add comment about readSignatures skipping compressed data packets 2022-05-08 11:34:56 +02:00
Paul Schaub 12e62d381c
Make readSignatures skip over compressed data packets without decompression. 2022-05-08 11:24:34 +02:00
Paul Schaub 49d65788b4 Remove support for processing compressed detached signatures
Signatures are indistinguishable from randomness, so there is no point in
compressing them, apart from attempting to exploit flaws in compression
algorithms.
Thanks to @DemiMarie for pointing this out

Fixes #286
2022-05-07 21:46:12 +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 05022fcbb5
Fix whitespace error 2022-04-07 21:17:00 +02:00
Paul Schaub e4bccaf58d
Add support for RegularExpression subpackets (fixes #246) 2022-04-07 20:47:47 +02:00
Paul Schaub 7710845454
Simplify setPolicyUrl implementation 2022-04-07 20:46:21 +02:00
Paul Schaub d4c56f655f
Add support for PolicyURI subpackets (fixes #248) 2022-04-07 20:41:21 +02:00
Paul Schaub 5f65ca4437
Remove workaround for BC not properly parsing RevocationKey subpacket 2022-04-07 20:28:45 +02:00
Péter Barabás 8c6813ce56 #266 Handle ClassCastException in signature.init calls 2022-04-05 14:36:58 +02:00
Paul Schaub f6c6b9aded
Do not attempt to verify signatures made by external keys using primary key.
This aims at fixing #266 in combination with #267.
2022-04-05 14:10:04 +02:00
Paul Schaub 4aaa242d64
Add javadoc to SignatureSubpacketsUtil 2022-04-04 10:40:57 +02:00
Paul Schaub 58dee0d970
Fix javadoc warnings 2022-04-02 18:56:05 +02:00
Paul Schaub 6869c66937
Add TODOs to remove deprecated methods in 1.2.X 2022-04-02 17:12:12 +02:00
Paul Schaub e8b03834cb
Annotate fromId(code) methods with Nullable and add Nonnull requireFromId(code) methods 2022-03-22 15:09:09 +01:00
Paul Schaub ffdbd21491 Implement configuration option for SignerUserId subpacket verification level.
By default we ignore SignerUserId subpackets on signatures.
This behavior can be changed by calling Policy.setSignerUserIdValidationLevel().
Right now, STRICT and DISABLED are available as options, but it may make sense to implement
another option PARTIALLY, which will accept signatures made by key with user-id 'A <foo@bar>'
but where the sig contains a signer user id of value 'foo@bar' for example.
2022-03-14 11:10:12 +01:00
Paul Schaub 26d79679f0
Fix crash when validating unmatched signer's user-id subpacket
TODO: We might want to deprecate Signer's UserID subpackets completely and ignore them.
See results of sequoias test suite once PR below gets merged.
https://gitlab.com/sequoia-pgp/openpgp-interoperability-test-suite/-/merge_requests/28
2022-03-09 21:05:00 +01:00
Paul Schaub db02106518
Fix typo 2022-03-07 14:57:00 +01:00
Paul Schaub 3fe78ab12a
Fix NPE when validating broken signature 2022-03-07 14:56:56 +01:00
Paul Schaub f1f7dec8b6
Fix accidental verification of thirdparty user-id revocations using primary key 2022-03-07 14:56:37 +01:00
Paul Schaub 9d160ef047
Reject subkeys with predating binding signatures 2022-03-07 12:17:45 +01:00
Paul Schaub 1949cc5eea
Fix generics of CertificationSubpackets callback 2022-03-02 11:15:07 +01:00
Paul Schaub db58280db6
Change default criticality of signature subpackets to mirror those of sequoia 2022-02-19 17:07:56 +01:00
Paul Schaub 41ed056165
By default emit IssuerFingerprint signature subpackets as non-critical 2022-02-19 16:05:02 +01:00
Paul Schaub 01839728f0 Remove workaround for publicKey.getBitStrength() == -1 in BC
see https://github.com/bcgit/bc-java/issues/972
2022-01-15 02:46:41 +01:00
Paul Schaub e374951ed0 Remove ProofUtil.
This does not belong here.
2022-01-15 02:46:41 +01:00
Paul Schaub 5e0ca369bf Document workaround for https://github.com/bcgit/bc-java/pull/1085 2022-01-15 02:46:41 +01:00
Paul Schaub fa0e208c98 Workaround for BC not correctly parsing RevocationKey packets 2022-01-15 02:46:41 +01:00
Paul Schaub 88e3c61b20 RevocationSignatureBuilder: Allow for generation of external revocation signatures 2022-01-15 02:46:41 +01:00
Paul Schaub 1447dfc642 Add SignatureUtils.wasIssuedBy 2022-01-15 02:46:41 +01:00
Paul Schaub 99496f80f5 Hex decode data in OpenPgpV4Fingerprint constructor 2022-01-15 02:46:41 +01:00
Paul Schaub b1bde161b4
Fix typos and wording 2021-12-28 13:53:25 +01:00
Paul Schaub ce7b69269b
Various code cleanup 2021-12-28 13:32:50 +01:00
Paul Schaub e96d668ee2 Clean up code 2021-12-28 12:18:51 +01:00