diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-01-12 20:03:03 +0100 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-01-12 20:08:35 +0100 |
commit | fc3397de5dabf23fac0de3fd297bcc4125864861 (patch) | |
tree | a663182859d2757d062ad26ac5580072f492c137 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java | |
parent | 01c3e7bbf98eead137f4c065c7108811d8f1be52 (diff) | |
download | open-keychain-fc3397de5dabf23fac0de3fd297bcc4125864861.tar.gz open-keychain-fc3397de5dabf23fac0de3fd297bcc4125864861.tar.bz2 open-keychain-fc3397de5dabf23fac0de3fd297bcc4125864861.zip |
add support for user attributes (during canonicalization)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java index c395ca52d..3dc02d3ed 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java @@ -29,6 +29,7 @@ import org.spongycastle.openpgp.PGPObjectFactory; import org.spongycastle.openpgp.PGPPublicKey; import org.spongycastle.openpgp.PGPSignature; import org.spongycastle.openpgp.PGPSignatureList; +import org.spongycastle.openpgp.PGPUserAttributeSubpacketVector; import org.spongycastle.openpgp.operator.jcajce.JcaPGPContentVerifierBuilderProvider; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException; @@ -199,6 +200,14 @@ public class WrappedSignature { } } + boolean verifySignature(PGPPublicKey key, PGPUserAttributeSubpacketVector attribute) throws PgpGeneralException { + try { + return mSig.verifyCertification(attribute, key); + } catch (PGPException e) { + throw new PgpGeneralException("Error!", e); + } + } + public boolean verifySignature(UncachedPublicKey key, byte[] rawUserId) throws PgpGeneralException { return verifySignature(key.getPublicKey(), rawUserId); } |