1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 22:32:07 +01:00

Change default criticality of signature subpackets to mirror those of sequoia

This commit is contained in:
Paul Schaub 2022-02-19 17:07:56 +01:00
parent 41ed056165
commit db58280db6
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 20 additions and 6 deletions

View file

@ -19,7 +19,7 @@ public class RevocationSignatureBuilder extends AbstractSignatureBuilder<Revocat
public RevocationSignatureBuilder(SignatureType signatureType, PGPSecretKey signingKey, SecretKeyRingProtector protector) throws PGPException { public RevocationSignatureBuilder(SignatureType signatureType, PGPSecretKey signingKey, SecretKeyRingProtector protector) throws PGPException {
super(signatureType, signingKey, protector); super(signatureType, signingKey, protector);
getHashedSubpackets().setRevocable(true, false); getHashedSubpackets().setRevocable(false);
} }
@Override @Override

View file

@ -82,10 +82,14 @@ public interface BaseSignatureSubpackets {
BaseSignatureSubpackets clearIntendedRecipientFingerprints(); BaseSignatureSubpackets clearIntendedRecipientFingerprints();
BaseSignatureSubpackets setExportable(boolean isExportable);
BaseSignatureSubpackets setExportable(boolean isCritical, boolean isExportable); BaseSignatureSubpackets setExportable(boolean isCritical, boolean isExportable);
BaseSignatureSubpackets setExportable(@Nullable Exportable exportable); BaseSignatureSubpackets setExportable(@Nullable Exportable exportable);
BaseSignatureSubpackets setRevocable(boolean revocable);
BaseSignatureSubpackets setRevocable(boolean isCritical, boolean isRevocable); BaseSignatureSubpackets setRevocable(boolean isCritical, boolean isRevocable);
BaseSignatureSubpackets setRevocable(@Nullable Revocable revocable); BaseSignatureSubpackets setRevocable(@Nullable Revocable revocable);

View file

@ -116,7 +116,7 @@ public class SignatureSubpackets
@Override @Override
public SignatureSubpackets setIssuerKeyId(long keyId) { public SignatureSubpackets setIssuerKeyId(long keyId) {
return setIssuerKeyId(true, keyId); return setIssuerKeyId(false, keyId);
} }
@Override @Override
@ -303,7 +303,7 @@ public class SignatureSubpackets
@Override @Override
public SignatureSubpackets setPreferredCompressionAlgorithms(Set<CompressionAlgorithm> algorithms) { public SignatureSubpackets setPreferredCompressionAlgorithms(Set<CompressionAlgorithm> algorithms) {
return setPreferredCompressionAlgorithms(true, algorithms); return setPreferredCompressionAlgorithms(false, algorithms);
} }
@Override @Override
@ -342,7 +342,7 @@ public class SignatureSubpackets
@Override @Override
public SignatureSubpackets setPreferredSymmetricKeyAlgorithms(Set<SymmetricKeyAlgorithm> algorithms) { public SignatureSubpackets setPreferredSymmetricKeyAlgorithms(Set<SymmetricKeyAlgorithm> algorithms) {
return setPreferredSymmetricKeyAlgorithms(true, algorithms); return setPreferredSymmetricKeyAlgorithms(false, algorithms);
} }
@Override @Override
@ -381,7 +381,7 @@ public class SignatureSubpackets
@Override @Override
public SignatureSubpackets setPreferredHashAlgorithms(Set<HashAlgorithm> algorithms) { public SignatureSubpackets setPreferredHashAlgorithms(Set<HashAlgorithm> algorithms) {
return setPreferredHashAlgorithms(true, algorithms); return setPreferredHashAlgorithms(false, algorithms);
} }
@Override @Override
@ -465,6 +465,11 @@ public class SignatureSubpackets
return new ArrayList<>(intendedRecipientFingerprintList); return new ArrayList<>(intendedRecipientFingerprintList);
} }
@Override
public SignatureSubpackets setExportable(boolean exportable) {
return setExportable(true, exportable);
}
@Override @Override
public SignatureSubpackets setExportable(boolean isCritical, boolean isExportable) { public SignatureSubpackets setExportable(boolean isCritical, boolean isExportable) {
return setExportable(new Exportable(isCritical, isExportable)); return setExportable(new Exportable(isCritical, isExportable));
@ -480,6 +485,11 @@ public class SignatureSubpackets
return exportable; return exportable;
} }
@Override
public SignatureSubpackets setRevocable(boolean revocable) {
return setRevocable(true, revocable);
}
@Override @Override
public SignatureSubpackets setRevocable(boolean isCritical, boolean isRevocable) { public SignatureSubpackets setRevocable(boolean isCritical, boolean isRevocable) {
return setRevocable(new Revocable(isCritical, isRevocable)); return setRevocable(new Revocable(isCritical, isRevocable));
@ -530,7 +540,7 @@ public class SignatureSubpackets
@Override @Override
public SignatureSubpackets setRevocationReason(RevocationAttributes revocationAttributes) { public SignatureSubpackets setRevocationReason(RevocationAttributes revocationAttributes) {
return setRevocationReason(true, revocationAttributes); return setRevocationReason(false, revocationAttributes);
} }
@Override @Override