Class ProxyCertificateImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyCertificateImpl​(java.security.cert.X509Certificate[] chain)  
      ProxyCertificateImpl​(java.security.cert.X509Certificate[] chain, java.security.PrivateKey privateKey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.cert.X509Certificate[] getCertificateChain()
      Returns the certificate chain of the proxy.
      X509Credential getCredential()
      Returns the X509Credential wrapping the generated private key and proxy certificate.
      java.security.PrivateKey getPrivateKey()
      Returns the generated private key of this proxy.
      boolean hasPrivateKey()  
      • Methods inherited from class java.lang.Object

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

      • ProxyCertificateImpl

        public ProxyCertificateImpl​(java.security.cert.X509Certificate[] chain,
                                    java.security.PrivateKey privateKey)
                             throws java.security.KeyStoreException
        Throws:
        java.security.KeyStoreException
      • ProxyCertificateImpl

        public ProxyCertificateImpl​(java.security.cert.X509Certificate[] chain)
    • Method Detail

      • getCertificateChain

        public java.security.cert.X509Certificate[] getCertificateChain()
        Description copied from interface: ProxyCertificate
        Returns the certificate chain of the proxy.
        Specified by:
        getCertificateChain in interface ProxyCertificate
        Returns:
        the Certificate chain starting with the generated proxy certificate.
      • getPrivateKey

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

        public X509Credential getCredential()
                                     throws java.lang.IllegalStateException
        Description copied from interface: ProxyCertificate
        Returns the X509Credential wrapping the generated private key and proxy certificate. This method is useful if KeyStore or KeyManager with the newly generated proxy certificate is needed.
        Specified by:
        getCredential in interface ProxyCertificate
        Returns:
        The generated credential wrapped in X509Credential
        Throws:
        java.lang.IllegalStateException - if the private and public keys were not generated