Class ProxyCertInfoExtension
- java.lang.Object
-
- org.bouncycastle.asn1.ASN1Object
-
- eu.emi.security.authn.x509.helpers.proxy.ProxyCertInfoExtension
-
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable,org.bouncycastle.util.Encodable
- Direct Known Subclasses:
DraftRFCProxyCertInfoExtension,RFCProxyCertInfoExtension
public abstract class ProxyCertInfoExtension extends org.bouncycastle.asn1.ASN1ObjectProxy cert info extension class. Defines the common contract, there are two implementationsDraftRFCProxyCertInfoExtensionandRFCProxyCertInfoExtensionas the ASN syntax is different for both types of proxies.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description protected intpathLenThe sub proxy path length, default is not limited.protected ProxyPolicypolicyThe underlying policy object.
-
Constructor Summary
Constructors Constructor Description ProxyCertInfoExtension()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProxyCertInfoExtensiongetInstance(java.security.cert.X509Certificate cert)Tries to generateProxyCertInfoExtensionobject from the provided certificate.ProxyPolicygetPolicy()Get the policy object of this extension.intgetProxyPathLimit()Get the proxy certificate path length limit of this extension, if set.
-
-
-
Field Detail
-
pathLen
protected int pathLen
The sub proxy path length, default is not limited.
-
policy
protected ProxyPolicy policy
The underlying policy object.
-
-
Method Detail
-
getInstance
public static ProxyCertInfoExtension getInstance(java.security.cert.X509Certificate cert) throws java.io.IOException
Tries to generateProxyCertInfoExtensionobject from the provided certificate. Returns null if the certificate has no proxy extension (draft or rfc).- Parameters:
cert- certificate- Returns:
- instance intialized from the certificate object
- Throws:
java.io.IOException- IO exception
-
getProxyPathLimit
public int getProxyPathLimit()
Get the proxy certificate path length limit of this extension, if set.- Returns:
- The number of allowed proxy certificates in the chain allowed after this certificate. -1 if not set.
-
getPolicy
public ProxyPolicy getPolicy()
Get the policy object of this extension.- Returns:
- The ProxyPolicy object.
-
-