public abstract class AbstractSecurityFactory extends Object implements SecurityFactory
SecurityFactory. It provides some common
methods.| Constructor and Description |
|---|
AbstractSecurityFactory() |
| Modifier and Type | Method and Description |
|---|---|
ConcurrentContentSigner |
createSigner(String type,
SignerConf conf,
X509Certificate cert)
Creates signer.
|
org.bouncycastle.operator.ContentVerifierProvider |
getContentVerifierProvider(PublicKey publicKey)
Gets the ContentVerifierProvider from the public key.
|
org.bouncycastle.operator.ContentVerifierProvider |
getContentVerifierProvider(X509Certificate cert)
Gets the ContentVerifierProvider from the certificate.
|
org.bouncycastle.operator.ContentVerifierProvider |
getContentVerifierProvider(org.bouncycastle.cert.X509CertificateHolder cert)
Gets the ContentVerifierProvider from the certificate.
|
boolean |
verifyPopo(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
AlgorithmValidator algoValidator)
Verifies the signature of CSR.
|
boolean |
verifyPopo(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
AlgorithmValidator algoValidator,
DHSigStaticKeyCertPair ownerKeyAndCert)
Verifies the signature of CSR.
|
boolean |
verifyPopo(org.bouncycastle.pkcs.PKCS10CertificationRequest csr,
AlgorithmValidator algoValidator)
Verifies the signature of CSR.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatePrivateKeyAndCert, createSigner, extractMinimalKeyStore, generatePublicKey, getContentVerifierProvider, getDfltSignerParallelism, getPasswordResolver, getRandom4Key, getRandom4Sign, getSupportedSignerTypes, refreshTokenForSignerType, verifyPopopublic ConcurrentContentSigner createSigner(String type, SignerConf conf, X509Certificate cert) throws org.xipki.util.ObjectCreationException
SecurityFactorycreateSigner in interface SecurityFactorytype - Type of the signer. Must not be null.conf - Configuration of the signer. Could be null.cert - Certificate of the signer. If not null, it will be used; otherwise
the certificates contained in the token will be used.org.xipki.util.ObjectCreationException - if could not create the signerpublic org.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(X509Certificate cert) throws InvalidKeyException
SecurityFactorygetContentVerifierProvider in interface SecurityFactorycert - Certificate that contains the signature verification key. Must not be null.InvalidKeyException - If the publicKey contained in the certificate is invalid or unsupported.public org.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(org.bouncycastle.cert.X509CertificateHolder cert)
throws InvalidKeyException
SecurityFactorygetContentVerifierProvider in interface SecurityFactorycert - Certificate that contains the signature verification key. Must not be null.InvalidKeyException - If the publicKey contained in the certificate is invalid or unsupported.public org.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(PublicKey publicKey) throws InvalidKeyException
SecurityFactorygetContentVerifierProvider in interface SecurityFactorypublicKey - Signature verification key. Must not be null.InvalidKeyException - If the publicKey is invalid or unsupported.public boolean verifyPopo(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
AlgorithmValidator algoValidator)
SecurityFactoryverifyPopo in interface SecurityFactorycsr - CSR to be verified. Must not be null.algoValidator - Signature algorithms validator. null to accept all algorithmstrue if the signature is valid and the signature algorithm is accepted,
false otherwise.public boolean verifyPopo(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
AlgorithmValidator algoValidator,
DHSigStaticKeyCertPair ownerKeyAndCert)
SecurityFactoryverifyPopo in interface SecurityFactorycsr - CSR to be verified. Must not be null.algoValidator - Signature algorithms validator. null to accept all algorithmsownerKeyAndCert - The owner's key and certificate for the CSR with Diffie-Hellman PoC.
May be null.true if the signature is valid and the signature algorithm is accepted,
false otherwise.public boolean verifyPopo(org.bouncycastle.pkcs.PKCS10CertificationRequest csr,
AlgorithmValidator algoValidator)
SecurityFactoryverifyPopo in interface SecurityFactorycsr - CSR to be verified. Must not be null.algoValidator - Signature algorithms validator. null to accept all algorithmstrue if the signature is valid and the signature algorithm is accepted,
false otherwise.Copyright © 2019. All rights reserved.