Class ProxyCSRImpl

  • All Implemented Interfaces:
    ProxyCSR

    public class ProxyCSRImpl
    extends java.lang.Object
    implements ProxyCSR
    ProxyCSR implementation.
    Author:
    K. Benedyczak
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyCSRImpl​(org.bouncycastle.pkcs.PKCS10CertificationRequest csr, java.security.PrivateKey pk)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.bouncycastle.pkcs.PKCS10CertificationRequest getCSR()
      Returns the CSR
      java.security.PrivateKey getPrivateKey()
      Returns the generated private key of this CSR.
      boolean hasPrivateKey()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProxyCSRImpl

        public ProxyCSRImpl​(org.bouncycastle.pkcs.PKCS10CertificationRequest csr,
                            java.security.PrivateKey pk)
        Parameters:
        csr - PKCS10 certification request
        pk - use null if PrivateKey was not generated
    • Method Detail

      • getCSR

        public org.bouncycastle.pkcs.PKCS10CertificationRequest getCSR()
        Returns the CSR
        Specified by:
        getCSR in interface ProxyCSR
        Returns:
        the generated CSR
      • getPrivateKey

        public java.security.PrivateKey getPrivateKey()
                                               throws java.lang.IllegalStateException
        Returns the generated private key of this CSR. If public key was manually set an exception is thrown.
        Specified by:
        getPrivateKey in interface ProxyCSR
        Returns:
        The private key.
        Throws:
        java.lang.IllegalStateException - if the private and public keys were not generated