Interface CertificateFactory
- All Known Implementing Classes:
RsaSha256CertificateFactory
public interface CertificateFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreateCertificateChain(NodeId certificateTypeId, KeyPair keyPair) Create aX509Certificatechain for the certificate of the type identified bycertificateTypeId.createKeyPair(NodeId certificateTypeId) Create aKeyPairfor the certificate of the type identified bycertificateTypeId.createSigningRequest(NodeId certificateTypeId, KeyPair keyPair, org.bouncycastle.asn1.x500.X500Name subjectName, String sanUri, List<String> dnsNames, List<String> ipAddresses) Create a PKCS10 certificate signing request for the certificate of the type identified bycertificateTypeId.
-
Method Details
-
createKeyPair
Create aKeyPairfor the certificate of the type identified bycertificateTypeId. -
createCertificateChain
X509Certificate[] createCertificateChain(NodeId certificateTypeId, KeyPair keyPair) throws Exception Create aX509Certificatechain for the certificate of the type identified bycertificateTypeId.- Parameters:
certificateTypeId- theNodeIdidentifying the type of certificate.keyPair- theKeyPairto use when creating the certificate chain.- Returns:
- the new
X509Certificatechain. - Throws:
Exception
-
createSigningRequest
ByteString createSigningRequest(NodeId certificateTypeId, KeyPair keyPair, org.bouncycastle.asn1.x500.X500Name subjectName, String sanUri, List<String> dnsNames, List<String> ipAddresses) throws Exception Create a PKCS10 certificate signing request for the certificate of the type identified bycertificateTypeId.- Parameters:
certificateTypeId- theNodeIdidentifying the type of certificate.keyPair- theKeyPairto use when creating the signing request.subjectName- theX500Nameto request.sanUri- the URI to request in the Subject Alternative Name of the CSR.dnsNames- the DNS names to request in the Subject Alternative Name of the CSR.ipAddresses- the IP addresses to request in the Subject Alternative Name of the CSR.- Returns:
- the new
ByteStringcontaining the DER-encoded PKCS10 signing request. - Throws:
Exception- if an error occurs while creating the signing request.
-