Class ProxyACExtension

java.lang.Object
org.bouncycastle.asn1.ASN1Object
eu.emi.security.authn.x509.helpers.proxy.ProxyACExtension
All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable, org.bouncycastle.util.Encodable

public class ProxyACExtension extends org.bouncycastle.asn1.ASN1Object
A class for handling the VOMS AC extension in certificates (OID: 1.3.6.1.4.1.8005.100.100.5)
Author:
K. Benedyczak
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The OID for the AC assertion.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProxyACExtension(byte[] bytes)
    Generates a new ProxyACExtension object form the byte array
    ProxyACExtension(org.bouncycastle.asn1.x509.AttributeCertificate[] certificates)
    Used to generate an instance from the AttributeCertificate object.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bouncycastle.asn1.x509.AttributeCertificate[]
    Used to get the AC extension object.
    Returns the AC extension form the certificate.
    org.bouncycastle.asn1.ASN1Primitive

    Methods inherited from class org.bouncycastle.asn1.ASN1Object

    encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ProxyACExtension

      public ProxyACExtension(byte[] bytes) throws IOException
      Generates a new ProxyACExtension object form the byte array
      Parameters:
      bytes - bytes
      Throws:
      IOException - IO exception
    • ProxyACExtension

      public ProxyACExtension(org.bouncycastle.asn1.x509.AttributeCertificate[] certificates)
      Used to generate an instance from the AttributeCertificate object.
      Parameters:
      certificates - the AC
  • Method Details

    • getInstance

      public static ProxyACExtension getInstance(X509Certificate cert) throws IOException
      Returns the AC extension form the certificate.
      Parameters:
      cert - certificate
      Returns:
      The AC extension object. In no extension was found, null is returned.
      Throws:
      IOException - In case there is a problem parsing the certificate.
    • getAttributeCertificates

      public org.bouncycastle.asn1.x509.AttributeCertificate[] getAttributeCertificates()
      Used to get the AC extension object.
      Returns:
      The AC object
    • toASN1Primitive

      public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
      Specified by:
      toASN1Primitive in interface org.bouncycastle.asn1.ASN1Encodable
      Specified by:
      toASN1Primitive in class org.bouncycastle.asn1.ASN1Object