public interface SecurityFactory
ConcurrentContentSigner, ContentVerifierProvider,
to verify POPO, to the random, etc.| Modifier and Type | Method and Description |
|---|---|
KeyCertPair |
createPrivateKeyAndCert(String type,
SignerConf conf,
X509Certificate cert)
Create secret key and certificate pair.
|
ConcurrentContentSigner |
createSigner(String type,
SignerConf conf,
X509Certificate cert)
Creates signer.
|
ConcurrentContentSigner |
createSigner(String type,
SignerConf conf,
X509Certificate[] certs)
Creates signer.
|
byte[] |
extractMinimalKeyStore(String keystoreType,
byte[] keystoreBytes,
String keyname,
char[] password,
X509Certificate[] newCertChain)
Extracts the keystore with minimal required information.
|
PublicKey |
generatePublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo)
Create PublicKey from the
subjectPublicKeyInfo. |
org.bouncycastle.operator.ContentVerifierProvider |
getContentVerifierProvider(PublicKey publicKey)
Gets the ContentVerifierProvider from the public key.
|
org.bouncycastle.operator.ContentVerifierProvider |
getContentVerifierProvider(PublicKey publicKey,
DHSigStaticKeyCertPair ownerKeyAndCert)
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.
|
int |
getDfltSignerParallelism() |
org.xipki.password.PasswordResolver |
getPasswordResolver() |
SecureRandom |
getRandom4Key() |
SecureRandom |
getRandom4Sign() |
Set<String> |
getSupportedSignerTypes()
Retrieves the types of supported signers.
|
void |
refreshTokenForSignerType(String signerType) |
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.
|
boolean |
verifyPopo(org.bouncycastle.pkcs.PKCS10CertificationRequest csr,
AlgorithmValidator algoValidator,
DHSigStaticKeyCertPair ownerKeyAndCert)
Verifies the signature of CSR.
|
org.xipki.password.PasswordResolver getPasswordResolver()
Set<String> getSupportedSignerTypes()
null.KeyCertPair createPrivateKeyAndCert(String type, SignerConf conf, X509Certificate cert) throws org.xipki.util.ObjectCreationException
type - 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 objectConcurrentContentSigner createSigner(String type, SignerConf conf, X509Certificate cert) throws org.xipki.util.ObjectCreationException
type - 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 signerConcurrentContentSigner createSigner(String type, SignerConf conf, X509Certificate[] certs) throws org.xipki.util.ObjectCreationException
type - Type of the signer. Must not be null.conf - Configuration of the signer. Could be null.certs - Certificates 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 signerorg.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(PublicKey publicKey) throws InvalidKeyException
publicKey - Signature verification key. Must not be null.InvalidKeyException - If the publicKey is invalid or unsupported.org.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(PublicKey publicKey, DHSigStaticKeyCertPair ownerKeyAndCert) throws InvalidKeyException
publicKey - Signature verification key. Must not be null.ownerKeyAndCert - The owner's key and certificate for the CSR with Diffie-Hellman PoC.
May be null.InvalidKeyException - If the publicKey is invalid or unsupported.org.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(X509Certificate cert) throws InvalidKeyException
cert - Certificate that contains the signature verification key. Must not be null.InvalidKeyException - If the publicKey contained in the certificate is invalid or unsupported.org.bouncycastle.operator.ContentVerifierProvider getContentVerifierProvider(org.bouncycastle.cert.X509CertificateHolder cert)
throws InvalidKeyException
cert - Certificate that contains the signature verification key. Must not be null.InvalidKeyException - If the publicKey contained in the certificate is invalid or unsupported.boolean verifyPopo(org.bouncycastle.pkcs.PKCS10CertificationRequest csr,
AlgorithmValidator algoValidator)
csr - 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.boolean verifyPopo(org.bouncycastle.pkcs.PKCS10CertificationRequest csr,
AlgorithmValidator algoValidator,
DHSigStaticKeyCertPair ownerKeyAndCert)
csr - 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.boolean verifyPopo(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
AlgorithmValidator algoValidator)
csr - 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.boolean verifyPopo(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
AlgorithmValidator algoValidator,
DHSigStaticKeyCertPair ownerKeyAndCert)
csr - 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.PublicKey generatePublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo) throws InvalidKeyException
subjectPublicKeyInfo.subjectPublicKeyInfo - From which the public key will be created. Must not be null.InvalidKeyException - if could not create public key.byte[] extractMinimalKeyStore(String keystoreType, byte[] keystoreBytes, String keyname, char[] password, X509Certificate[] newCertChain) throws KeyStoreException
keyname is set, and its associated entry is a key entry, then only this
entry is remained.keyname is null and there exists at least one key entry, then only
the first entry is remained.KeyStoreException will be thrown.keystoreType - Type of the keystore. Must not be null.keystoreBytes - Content of the keystpre. Must not be null.keyname - Name (alias) of the key. Could be null.password - Password of the keystore and key. Must not be null.newCertChain - New certificates. If not null, the certificates in the keystore will be
replaced.KeyStoreException - If case 3 occurs.SecureRandom getRandom4Sign()
SecureRandom getRandom4Key()
int getDfltSignerParallelism()
void refreshTokenForSignerType(String signerType) throws XiSecurityException
XiSecurityExceptionCopyright © 2019. All rights reserved.