mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-08 21:31:08 +01:00
Add test for UniversalSignatureBuilder
This commit is contained in:
parent
4426895814
commit
ae6a427d90
3 changed files with 95 additions and 2 deletions
|
|
@ -12,7 +12,6 @@ import org.bouncycastle.openpgp.PGPSignature;
|
|||
import org.bouncycastle.openpgp.PGPSignatureGenerator;
|
||||
import org.pgpainless.algorithm.SignatureType;
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector;
|
||||
import org.pgpainless.signature.subpackets.BaseSignatureSubpackets;
|
||||
import org.pgpainless.signature.subpackets.SignatureSubpackets;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +42,7 @@ public class UniversalSignatureBuilder extends AbstractSignatureBuilder<Universa
|
|||
return unhashedSubpackets;
|
||||
}
|
||||
|
||||
public void applyCallback(@Nullable BaseSignatureSubpackets.Callback callback) {
|
||||
public void applyCallback(@Nullable SignatureSubpackets.Callback callback) {
|
||||
if (callback != null) {
|
||||
callback.modifyHashedSubpackets(getHashedSubpackets());
|
||||
callback.modifyUnhashedSubpackets(getUnhashedSubpackets());
|
||||
|
|
|
|||
|
|
@ -82,6 +82,10 @@ public class SignatureSubpackets
|
|||
|
||||
}
|
||||
|
||||
public interface Callback extends SignatureSubpacketCallback<SignatureSubpackets> {
|
||||
|
||||
}
|
||||
|
||||
public static SignatureSubpackets refreshHashedSubpackets(PGPPublicKey issuer, PGPSignature oldSignature) {
|
||||
return createHashedSubpacketsFrom(issuer, oldSignature.getHashedSubPackets());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue