mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +01:00
SecretKeyRingEditor: referenceTime cannot be null anymore
This commit is contained in:
parent
21ae48d8c1
commit
09bacd40d1
1 changed files with 3 additions and 9 deletions
|
@ -124,9 +124,7 @@ public class SecretKeyRingEditor implements SecretKeyRingEditorInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
SelfSignatureBuilder builder = new SelfSignatureBuilder(primaryKey, protector);
|
SelfSignatureBuilder builder = new SelfSignatureBuilder(primaryKey, protector);
|
||||||
if (referenceTime != null) {
|
builder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||||
builder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
|
||||||
}
|
|
||||||
builder.setSignatureType(SignatureType.POSITIVE_CERTIFICATION);
|
builder.setSignatureType(SignatureType.POSITIVE_CERTIFICATION);
|
||||||
|
|
||||||
// Retain signature subpackets of previous signatures
|
// Retain signature subpackets of previous signatures
|
||||||
|
@ -351,16 +349,12 @@ public class SecretKeyRingEditor implements SecretKeyRingEditorInterface {
|
||||||
.getV4FingerprintCalculator(), false, subkeyProtector.getEncryptor(subkey.getKeyID()));
|
.getV4FingerprintCalculator(), false, subkeyProtector.getEncryptor(subkey.getKeyID()));
|
||||||
|
|
||||||
SubkeyBindingSignatureBuilder skBindingBuilder = new SubkeyBindingSignatureBuilder(primaryKey, primaryKeyProtector, hashAlgorithm);
|
SubkeyBindingSignatureBuilder skBindingBuilder = new SubkeyBindingSignatureBuilder(primaryKey, primaryKeyProtector, hashAlgorithm);
|
||||||
if (referenceTime != null) {
|
skBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||||
skBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
|
||||||
}
|
|
||||||
skBindingBuilder.getHashedSubpackets().setKeyFlags(flags);
|
skBindingBuilder.getHashedSubpackets().setKeyFlags(flags);
|
||||||
|
|
||||||
if (subkeyAlgorithm.isSigningCapable()) {
|
if (subkeyAlgorithm.isSigningCapable()) {
|
||||||
PrimaryKeyBindingSignatureBuilder pkBindingBuilder = new PrimaryKeyBindingSignatureBuilder(secretSubkey, subkeyProtector, hashAlgorithm);
|
PrimaryKeyBindingSignatureBuilder pkBindingBuilder = new PrimaryKeyBindingSignatureBuilder(secretSubkey, subkeyProtector, hashAlgorithm);
|
||||||
if (referenceTime != null) {
|
pkBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||||
pkBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
|
||||||
}
|
|
||||||
PGPSignature pkBinding = pkBindingBuilder.build(primaryKey.getPublicKey());
|
PGPSignature pkBinding = pkBindingBuilder.build(primaryKey.getPublicKey());
|
||||||
skBindingBuilder.getHashedSubpackets().addEmbeddedSignature(pkBinding);
|
skBindingBuilder.getHashedSubpackets().addEmbeddedSignature(pkBinding);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue