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.ASN1Object
Proxy cert info extension class. Defines the common contract, there are two implementations
DraftRFCProxyCertInfoExtension
and RFCProxyCertInfoExtension
as the ASN syntax is
different for both types of proxies.- Author:
- K. Benedyczak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The sub proxy path length, default is not limited.protected ProxyPolicy
The underlying policy object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProxyCertInfoExtension
getInstance
(X509Certificate cert) Tries to generateProxyCertInfoExtension
object from the provided certificate.Get the policy object of this extension.int
Get the proxy certificate path length limit of this extension, if set.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Primitive
-
Field Details
-
pathLen
protected int pathLenThe sub proxy path length, default is not limited. -
policy
The underlying policy object.
-
-
Constructor Details
-
ProxyCertInfoExtension
public ProxyCertInfoExtension()
-
-
Method Details
-
getInstance
Tries to generateProxyCertInfoExtension
object 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:
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
Get the policy object of this extension.- Returns:
- The ProxyPolicy object.
-