Class ProxyGenerator


  • public class ProxyGenerator
    extends java.lang.Object
    Utilities to create proxy certificates.
    Author:
    K. Benedyczak
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyGenerator()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ProxyCertificate generate​(ProxyCertificateOptions param, java.security.PrivateKey privateKey)
      Generate the proxy certificate object from the local certificate.
      static java.security.cert.X509Certificate[] generate​(ProxyRequestOptions param, java.security.PrivateKey privateKey)
      Generate the proxy certificate object from the received Certificate Signing Request.
      • Methods inherited from class java.lang.Object

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

      • ProxyGenerator

        public ProxyGenerator()
    • Method Detail

      • generate

        public static ProxyCertificate generate​(ProxyCertificateOptions param,
                                                java.security.PrivateKey privateKey)
                                         throws java.security.InvalidKeyException,
                                                java.security.SignatureException,
                                                java.security.NoSuchAlgorithmException,
                                                java.security.cert.CertificateParsingException,
                                                java.io.IOException
        Generate the proxy certificate object from the local certificate.
        Parameters:
        param - proxy parameters
        privateKey - key to sign the proxy
        Returns:
        a newly created proxy certificate, wrapped together with a private key if it was also generated.
        Throws:
        java.security.InvalidKeyException - invalid key exception
        java.security.SignatureException - signature exception
        java.security.NoSuchAlgorithmException - no such algorithm exception
        java.security.cert.CertificateParsingException - certificate parsing exception
        java.io.IOException - IO exception
      • generate

        public static java.security.cert.X509Certificate[] generate​(ProxyRequestOptions param,
                                                                    java.security.PrivateKey privateKey)
                                                             throws java.security.InvalidKeyException,
                                                                    java.security.SignatureException,
                                                                    java.security.NoSuchAlgorithmException,
                                                                    java.security.cert.CertificateParsingException,
                                                                    java.io.IOException
        Generate the proxy certificate object from the received Certificate Signing Request.
        Parameters:
        param - proxy parameters
        privateKey - key to sign the proxy
        Returns:
        chain with the new proxy on the first position
        Throws:
        java.security.InvalidKeyException - invalid key exception
        java.security.SignatureException - signature exception
        java.security.NoSuchAlgorithmException - no such algorithm exception
        java.security.cert.CertificateParsingException - certificate parsing exception
        java.io.IOException - IO exception