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 Details

    • pathLen

      protected int pathLen
      The sub proxy path length, default is not limited.
    • policy

      protected ProxyPolicy policy
      The underlying policy object.
  • Constructor Details

    • ProxyCertInfoExtension

      public ProxyCertInfoExtension()
  • Method Details

    • getInstance

      public static ProxyCertInfoExtension getInstance(X509Certificate cert) throws IOException
      Tries to generate ProxyCertInfoExtension 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

      public ProxyPolicy getPolicy()
      Get the policy object of this extension.
      Returns:
      The ProxyPolicy object.