public class ProxyGeneratorHelper extends Object
ProxyGenerator
.Constructor and Description |
---|
ProxyGeneratorHelper() |
Modifier and Type | Method and Description |
---|---|
static BigInteger |
establishSerial(BaseProxyCertificateOptions param)
For LEGACY proxies returns the serial from the issuing certificate.
|
ProxyCertificate |
generate(ProxyCertificateOptions param,
PrivateKey privateKey)
Generate the proxy certificate object from the local certificate.
|
X509Certificate[] |
generate(ProxyRequestOptions param,
PrivateKey privateKey)
Generate the proxy certificate object from the received Certificate Signing Request.
|
static X500Name |
generateDN(X500Principal parentSubject,
ProxyType type,
boolean limited,
BigInteger serial)
Generate a correct DN for the proxy, depending on its type.
|
static KeyPair |
generateKeyPair(int len) |
static Integer |
getChainKeyUsage(X509Certificate[] chain)
If the input chain has no KeyUsage extension null is returned.
|
public ProxyCertificate generate(ProxyCertificateOptions param, PrivateKey privateKey) throws InvalidKeyException, SignatureException, NoSuchAlgorithmException, CertificateParsingException, IOException
param
- proxy parametersprivateKey
- key to sign the proxyInvalidKeyException
- invalid key exceptionSignatureException
- signature exceptionNoSuchAlgorithmException
- no such algorithm exceptionCertificateParsingException
- certificate parsing exceptionIOException
- IO exceptionpublic X509Certificate[] generate(ProxyRequestOptions param, PrivateKey privateKey) throws InvalidKeyException, SignatureException, NoSuchAlgorithmException, CertificateParsingException, IOException
param
- proxy parametersprivateKey
- key to sign the proxyInvalidKeyException
- invalid key exceptionSignatureException
- signature exceptionNoSuchAlgorithmException
- no such algorithm exceptionCertificateParsingException
- certificate encoding exceptionIOException
- IO exceptionpublic static Integer getChainKeyUsage(X509Certificate[] chain)
chain
- certificate chainpublic static BigInteger establishSerial(BaseProxyCertificateOptions param)
param
- proxy certificate optionspublic static X500Name generateDN(X500Principal parentSubject, ProxyType type, boolean limited, BigInteger serial)
parentSubject
- parent subjecttype
- proxy typelimited
- true if limited proxyserial
- serial numberpublic static KeyPair generateKeyPair(int len)
Copyright © 2012-2017 European Middleware Initiative. All Rights Reserved.