All Known Implementing Classes:
RsaSha256CertificateFactory

public interface CertificateFactory
  • Method Details

    • createKeyPair

      KeyPair createKeyPair(NodeId certificateTypeId) throws Exception
      Create a KeyPair for the certificate of the type identified by certificateTypeId.
      Parameters:
      certificateTypeId - the NodeId identifying the type of certificate.
      Returns:
      the new KeyPair.
      Throws:
      Exception
    • createCertificateChain

      X509Certificate[] createCertificateChain(NodeId certificateTypeId, KeyPair keyPair) throws Exception
      Create a X509Certificate chain for the certificate of the type identified by certificateTypeId.
      Parameters:
      certificateTypeId - the NodeId identifying the type of certificate.
      keyPair - the KeyPair to use when creating the certificate chain.
      Returns:
      the new X509Certificate chain.
      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 by certificateTypeId.
      Parameters:
      certificateTypeId - the NodeId identifying the type of certificate.
      keyPair - the KeyPair to use when creating the signing request.
      subjectName - the X500Name to 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 ByteString containing the DER-encoded PKCS10 signing request.
      Throws:
      Exception - if an error occurs while creating the signing request.