eu.emi.security.authn.x509.helpers.proxy
Class ProxyGeneratorHelper
java.lang.Object
eu.emi.security.authn.x509.helpers.proxy.ProxyGeneratorHelper
public class ProxyGeneratorHelper
- extends Object
Actual implementation of the Proxy generation. The object is for one use only,
i.e. it should not be reused to generate first certificate. It is strongly suggested
to use ProxyGenerator
.
- Author:
- K. Benedyczak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GRACE_PERIOD
public static final int GRACE_PERIOD
- See Also:
- Constant Field Values
ProxyGeneratorHelper
public ProxyGeneratorHelper()
generate
public ProxyCertificate generate(ProxyCertificateOptions param,
PrivateKey privateKey)
throws InvalidKeyException,
SignatureException,
NoSuchAlgorithmException,
CertificateParsingException
- Generate the proxy certificate object from the local certificate.
- Parameters:
param
- proxy parametersprivateKey
- key to sign the proxy
- Returns:
- a newly created proxy certificate, wrapped together with a private key
if it was also generated.
- Throws:
InvalidKeyException
SignatureException
NoSuchAlgorithmException
CertificateEncodingException
CertificateParsingException
generate
public X509Certificate[] generate(ProxyRequestOptions param,
PrivateKey privateKey)
throws InvalidKeyException,
SignatureException,
NoSuchAlgorithmException,
CertificateParsingException
- Generate the proxy certificate object from the received Certificate Signing Request.
- Parameters:
param
- proxy parametersprivateKey
- key to sign the proxy
- Returns:
- chain with the new proxy on the first position
- Throws:
InvalidKeyException
SignatureException
NoSuchAlgorithmException
CertificateEncodingException
CertificateParsingException
generateDN
public static X500Name generateDN(X500Principal parentSubject,
ProxyType type,
boolean limited,
BigInteger serial)
- Generate a correct DN for the proxy, depending on its type.
- Parameters:
parentSubject
- type
- limited
- serial
-
- Returns:
- generated proxy DN
generateKeyPair
public static KeyPair generateKeyPair(int len)
Copyright © 2012 European Middleware Initiative. All Rights Reserved.