mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-13 20:29:39 +02:00
Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
af7da01497 | |||
23e6b6a35e | |||
03dbd2f03f | |||
d65a26fbf5 |
7 changed files with 13 additions and 13 deletions
|
@ -5,6 +5,10 @@ SPDX-License-Identifier: CC0-1.0
|
|||
|
||||
# PGPainless Changelog
|
||||
|
||||
# 1.4.5
|
||||
- Bugfix: Direct-Key signatures are calculated over the signee key only, not the signer key + signee key
|
||||
- Security: Fix faulty bit-strength policy check for signing subkeys
|
||||
|
||||
## 1.4.4
|
||||
- Fix expectations on subpackets of v3 signatures (thanks @bjansen)
|
||||
- Properly verify v3 signatures, which do not yet have signature subpackets, yet we required them to have
|
||||
|
|
|
@ -191,7 +191,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.pgpainless:pgpainless-core:1.4.4'
|
||||
implementation 'org.pgpainless:pgpainless-core:1.4.5'
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ public final class SigningOptions {
|
|||
SubkeyIdentifier signingKeyIdentifier = new SubkeyIdentifier(secretKey, signingSubkey.getKeyID());
|
||||
PGPSecretKey signingSecretKey = secretKey.getSecretKey(signingSubkey.getKeyID());
|
||||
PublicKeyAlgorithm publicKeyAlgorithm = PublicKeyAlgorithm.requireFromId(signingSecretKey.getPublicKey().getAlgorithm());
|
||||
int bitStrength = secretKey.getPublicKey().getBitStrength();
|
||||
int bitStrength = signingSecretKey.getPublicKey().getBitStrength();
|
||||
if (!PGPainless.getPolicy().getPublicKeyAlgorithmPolicy().isAcceptable(publicKeyAlgorithm, bitStrength)) {
|
||||
throw new KeyException.UnacceptableSigningKeyException(
|
||||
new KeyException.PublicKeyAlgorithmPolicyException(
|
||||
|
|
|
@ -43,11 +43,7 @@ public class ThirdPartyDirectKeySignatureBuilder extends AbstractSignatureBuilde
|
|||
|
||||
public PGPSignature build(PGPPublicKey key) throws PGPException {
|
||||
PGPSignatureGenerator signatureGenerator = buildAndInitSignatureGenerator();
|
||||
if (key.getKeyID() != publicSigningKey.getKeyID()) {
|
||||
return signatureGenerator.generateCertification(publicSigningKey, key);
|
||||
} else {
|
||||
return signatureGenerator.generateCertification(key);
|
||||
}
|
||||
return signatureGenerator.generateCertification(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -539,10 +539,10 @@ public abstract class SignatureValidator {
|
|||
try {
|
||||
signature.init(ImplementationFactory.getInstance().getPGPContentVerifierBuilderProvider(), signer);
|
||||
boolean valid;
|
||||
if (signer.getKeyID() != signee.getKeyID()) {
|
||||
valid = signature.verifyCertification(signer, signee);
|
||||
} else {
|
||||
if (signer.getKeyID() == signee.getKeyID() || signature.getSignatureType() == PGPSignature.DIRECT_KEY) {
|
||||
valid = signature.verifyCertification(signee);
|
||||
} else {
|
||||
valid = signature.verifyCertification(signer, signee);
|
||||
}
|
||||
if (!valid) {
|
||||
throw new SignatureValidationException("Signature is not correct.");
|
||||
|
|
|
@ -23,7 +23,7 @@ To start using pgpainless-sop in your code, include the following lines in your
|
|||
...
|
||||
dependencies {
|
||||
...
|
||||
implementation "org.pgpainless:pgpainless-sop:1.4.4"
|
||||
implementation "org.pgpainless:pgpainless-sop:1.4.5"
|
||||
...
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ dependencies {
|
|||
<dependency>
|
||||
<groupId>org.pgpainless</groupId>
|
||||
<artifactId>pgpainless-sop</artifactId>
|
||||
<version>1.4.4</version>
|
||||
<version>1.4.5</version>
|
||||
</dependency>
|
||||
...
|
||||
</dependencies>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
allprojects {
|
||||
ext {
|
||||
shortVersion = '1.4.5'
|
||||
isSnapshot = true
|
||||
isSnapshot = false
|
||||
pgpainlessMinAndroidSdk = 10
|
||||
javaSourceCompatibility = 1.8
|
||||
bouncyCastleVersion = '1.72'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue