• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.bouncycastle.operator;
2 
3 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
4 import org.bouncycastle.cert.X509CertificateHolder;
5 
6 /**
7  * General interface for providers of ContentVerifier objects.
8  */
9 public interface ContentVerifierProvider
10 {
11     /**
12      * Return whether or not this verifier has a certificate associated with it.
13      *
14      * @return true if there is an associated certificate, false otherwise.
15      */
hasAssociatedCertificate()16     boolean hasAssociatedCertificate();
17 
18     /**
19      * Return the associated certificate if there is one.
20      *
21      * @return a holder containing the associated certificate if there is one, null if there is not.
22      */
getAssociatedCertificate()23     X509CertificateHolder getAssociatedCertificate();
24 
25     /**
26      * Return a ContentVerifier that matches the passed in algorithm identifier,
27      *
28      * @param verifierAlgorithmIdentifier the algorithm and parameters required.
29      * @return a matching ContentVerifier
30      * @throws OperatorCreationException if the required ContentVerifier cannot be created.
31      */
get(AlgorithmIdentifier verifierAlgorithmIdentifier)32     ContentVerifier get(AlgorithmIdentifier verifierAlgorithmIdentifier)
33         throws OperatorCreationException;
34 }
35