Package eu.emi.security.authn.x509.proxy
Class ProxyCertificateOptions
java.lang.Object
eu.emi.security.authn.x509.proxy.BaseProxyCertificateOptions
eu.emi.security.authn.x509.proxy.ProxyCertificateOptions
Holds parameters which are used to create a proxy certificate using
only a certificate chain.
- Author:
- J. Hahkala, K. Benedyczak
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class eu.emi.security.authn.x509.proxy.BaseProxyCertificateOptions
DEFAULT_KEY_USAGE, DEFAULT_LIFETIME, UNLIMITED_PROXY_LENGTH
-
Constructor Summary
ConstructorsConstructorDescriptionProxyCertificateOptions
(X509Certificate[] parentCertChain) Create a new proxy cert based on the parent cert chain. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the length of the keys to be generated.Returns the manually set public key for the proxy.void
setKeyLength
(int length) Sets the length of the keys to be generated, only used if the keys are not set separately.void
setPublicKey
(PublicKey pubKey) Manually sets public key which shall be included in the generated proxyMethods inherited from class eu.emi.security.authn.x509.proxy.BaseProxyCertificateOptions
addExtension, getAttributeCertificates, getExtensions, getLifetime, getNotBefore, getParentCertChain, getPolicy, getProxyKeyUsageMask, getProxyPathLimit, getProxyTracingIssuer, getProxyTracingSubject, getSAMLAssertion, getSerialNumber, getSourceRestrictionExcludedAddresses, getSourceRestrictionPermittedAddresses, getTargetRestrictionExcludedAddresses, getTargetRestrictionPermittedAddresses, getType, isLimited, setAttributeCertificates, setLifetime, setLifetime, setLimited, setPolicy, setProxyKeyUsageMask, setProxyPathLimit, setProxyTracingIssuer, setProxyTracingSubject, setSAMLAssertion, setSerialNumber, setSourceRestrictionExcludedAddresses, setSourceRestrictionExcludedAddresses, setSourceRestrictionPermittedAddresses, setSourceRestrictionPermittedAddresses, setTargetRestrictionExcludedAddresses, setTargetRestrictionExcludedAddresses, setTargetRestrictionPermittedAddresses, setTargetRestrictionPermittedAddresses, setType, setValidityBounds
-
Field Details
-
DEFAULT_KEY_LENGTH
public static final int DEFAULT_KEY_LENGTH- See Also:
-
DEFAULT_LONG_KEY_LENGTH
public static final int DEFAULT_LONG_KEY_LENGTH- See Also:
-
LONG_PROXY
public static final int LONG_PROXY- See Also:
-
-
Constructor Details
-
ProxyCertificateOptions
Create a new proxy cert based on the parent cert chain. Useful when locally creating a proxy from existing cert chain.- Parameters:
parentCertChain
- parent certificate chain
-
-
Method Details
-
setKeyLength
public void setKeyLength(int length) Sets the length of the keys to be generated, only used if the keys are not set separately. If this method is not used, the default is 1024 bits.- Parameters:
length
- to be set
-
getKeyLength
public int getKeyLength()Gets the length of the keys to be generated. By default it returns value of DEFAULT_KEY_LENGTH, or, if proxy liftime exceeds LONG_PROXY, DEFAULT_LONG_KEY_LENGTH.- Returns:
- the currently set key length
-
setPublicKey
Manually sets public key which shall be included in the generated proxy- Parameters:
pubKey
- the public key to set
-
getPublicKey
Returns the manually set public key for the proxy.- Returns:
- the public key
-