mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-17 18:02:05 +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);
|
||||
if (referenceTime != null) {
|
||||
builder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||
}
|
||||
builder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||
builder.setSignatureType(SignatureType.POSITIVE_CERTIFICATION);
|
||||
|
||||
// Retain signature subpackets of previous signatures
|
||||
|
@ -351,16 +349,12 @@ public class SecretKeyRingEditor implements SecretKeyRingEditorInterface {
|
|||
.getV4FingerprintCalculator(), false, subkeyProtector.getEncryptor(subkey.getKeyID()));
|
||||
|
||||
SubkeyBindingSignatureBuilder skBindingBuilder = new SubkeyBindingSignatureBuilder(primaryKey, primaryKeyProtector, hashAlgorithm);
|
||||
if (referenceTime != null) {
|
||||
skBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||
}
|
||||
skBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||
skBindingBuilder.getHashedSubpackets().setKeyFlags(flags);
|
||||
|
||||
if (subkeyAlgorithm.isSigningCapable()) {
|
||||
PrimaryKeyBindingSignatureBuilder pkBindingBuilder = new PrimaryKeyBindingSignatureBuilder(secretSubkey, subkeyProtector, hashAlgorithm);
|
||||
if (referenceTime != null) {
|
||||
pkBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||
}
|
||||
pkBindingBuilder.getHashedSubpackets().setSignatureCreationTime(referenceTime);
|
||||
PGPSignature pkBinding = pkBindingBuilder.build(primaryKey.getPublicKey());
|
||||
skBindingBuilder.getHashedSubpackets().addEmbeddedSignature(pkBinding);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue