eu.emi.security.authn.x509.proxy
Class ProxyCSRGenerator

java.lang.Object
  extended by eu.emi.security.authn.x509.proxy.ProxyCSRGenerator

public class ProxyCSRGenerator
extends Object

Generates a proxy certificate signing request. The request parameters may contain extensions which are passed in the generated Certificate Signing Request. Of course the peer issuing the proxy certificate may ignore them.

The following rules are applied basing on the parameters object:

Author:
K. Benedyczak

Constructor Summary
ProxyCSRGenerator()
           
 
Method Summary
static ProxyCSR generate(ProxyCertificateOptions param)
          Generate the proxy certificate object.
static ProxyCSR generate(ProxyCertificateOptions param, PrivateKey signingKey)
          Generate the proxy certificate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyCSRGenerator

public ProxyCSRGenerator()
Method Detail

generate

public static ProxyCSR generate(ProxyCertificateOptions param)
                         throws InvalidKeyException,
                                SignatureException,
                                NoSuchAlgorithmException,
                                CertificateEncodingException
Generate the proxy certificate object. Use this method if you want to sign the proxy with the key which will be autogenerated together with the public part which will be included in the proxy itself. This method will throw an exception if used with parameter which has public key manually set.

Parameters:
param - request creation parameters
Returns:
Proxy certificate signing request
Throws:
InvalidKeyException
SignatureException
NoSuchAlgorithmException
CertificateEncodingException
IllegalArgumentException - when signingKey is null and public key was manully set

generate

public static ProxyCSR generate(ProxyCertificateOptions param,
                                PrivateKey signingKey)
                         throws InvalidKeyException,
                                SignatureException,
                                NoSuchAlgorithmException,
                                CertificateEncodingException
Generate the proxy certificate object. Use this method if you want to manually specify the CSR signing key. This is normally the case when the ProxyCertificateOptions parameter contains a manually set public key.

Parameters:
param - request creation parameters
Returns:
Proxy certificate signing request
Throws:
InvalidKeyException
SignatureException
NoSuchAlgorithmException
CertificateEncodingException
IllegalArgumentException - when signingKey is null and public key was manully set


Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.