diff options
author | Sergio Giro <sgiro@google.com> | 2015-12-11 18:58:58 +0000 |
---|---|---|
committer | Sergio Giro <sgiro@google.com> | 2016-01-25 15:38:49 +0000 |
commit | 16f9ee464b68937f45d009d9c1b0eb9b544a8dee (patch) | |
tree | 61086f6673133c387b13b0e494e42973c6f4c0e8 /bcpkix/src/main/java/org/bouncycastle/operator/ContentVerifierProvider.java | |
parent | fcfe48e7cf461bf4a6314802c0f31f292d87ab95 (diff) | |
download | bouncycastle-16f9ee464b68937f45d009d9c1b0eb9b544a8dee.tar.gz |
bouncycastle: Android tree with upstream code for version 1.49
Android tree as of 08e455bd61ddaa02255383e85480b0d9cde6e954
Change-Id: I99dab80b49707f0fdefb67ccd1bcfe765363b5e5
Diffstat (limited to 'bcpkix/src/main/java/org/bouncycastle/operator/ContentVerifierProvider.java')
-rw-r--r-- | bcpkix/src/main/java/org/bouncycastle/operator/ContentVerifierProvider.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bcpkix/src/main/java/org/bouncycastle/operator/ContentVerifierProvider.java b/bcpkix/src/main/java/org/bouncycastle/operator/ContentVerifierProvider.java new file mode 100644 index 00000000..9594382f --- /dev/null +++ b/bcpkix/src/main/java/org/bouncycastle/operator/ContentVerifierProvider.java @@ -0,0 +1,34 @@ +package org.bouncycastle.operator; + +import org.bouncycastle.asn1.x509.AlgorithmIdentifier; +import org.bouncycastle.cert.X509CertificateHolder; + +/** + * General interface for providers of ContentVerifier objects. + */ +public interface ContentVerifierProvider +{ + /** + * Return whether or not this verifier has a certificate associated with it. + * + * @return true if there is an associated certificate, false otherwise. + */ + boolean hasAssociatedCertificate(); + + /** + * Return the associated certificate if there is one. + * + * @return a holder containing the associated certificate if there is one, null if there is not. + */ + X509CertificateHolder getAssociatedCertificate(); + + /** + * Return a ContentVerifier that matches the passed in algorithm identifier, + * + * @param verifierAlgorithmIdentifier the algorithm and parameters required. + * @return a matching ContentVerifier + * @throws OperatorCreationException if the required ContentVerifier cannot be created. + */ + ContentVerifier get(AlgorithmIdentifier verifierAlgorithmIdentifier) + throws OperatorCreationException; +} |