org.glite.security.util.proxy
Class ProxyCertInfoExtension

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Encodable
      extended by org.glite.security.util.proxy.ProxyCertInfoExtension
All Implemented Interfaces:
org.bouncycastle.asn1.DEREncodable

public class ProxyCertInfoExtension
extends org.bouncycastle.asn1.ASN1Encodable

Proxy cert info extension ASN1 class.

 ProxyCertInfoExtension ::= SEQUENCE { 
          pCPathLenConstraint    ProxyCertPathLengthConstraint OPTIONAL, 
          proxyPolicy            ProxyPolicy }
  
     ProxyCertPathLengthConstraint ::= INTEGER
 

Author:
Joni Hahkala

Field Summary
static java.lang.String DRAFT_PROXY_CERT_INFO_EXTENSION_OID
          The oid of the rfc draft proxy cert extension.
static java.lang.String PROXY_CERT_INFO_EXTENSION_OID
          The oid of the proxy cert info extension, defined in the RFC 3820.
static int UNLIMITED
          Identifier for no proxy path length limit.
 
Fields inherited from class org.bouncycastle.asn1.ASN1Encodable
BER, DER
 
Constructor Summary
ProxyCertInfoExtension()
          Generate a proxy that inherits all rights and that has no cert path limitations.
ProxyCertInfoExtension(org.bouncycastle.asn1.ASN1Sequence seq)
          Read a proxyCertInfoExtension from the ASN1 sequence.
ProxyCertInfoExtension(byte[] bytes)
          Constructor that generates instance out of byte array.
ProxyCertInfoExtension(int len, ProxyPolicy policy)
          Generate new proxy certificate info extension with length limit len and policy policy.
 
Method Summary
 ProxyPolicy getPolicy()
          Get the policy object of this extension.
 int getProxyPathLimit()
          Get the proxy certificate path length limit of this extension, if set.
 org.bouncycastle.asn1.DERObject toASN1Object()
           
 
Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNLIMITED

public static final int UNLIMITED
Identifier for no proxy path length limit.

See Also:
Constant Field Values

PROXY_CERT_INFO_EXTENSION_OID

public static final java.lang.String PROXY_CERT_INFO_EXTENSION_OID
The oid of the proxy cert info extension, defined in the RFC 3820.

See Also:
Constant Field Values

DRAFT_PROXY_CERT_INFO_EXTENSION_OID

public static final java.lang.String DRAFT_PROXY_CERT_INFO_EXTENSION_OID
The oid of the rfc draft proxy cert extension.

See Also:
Constant Field Values
Constructor Detail

ProxyCertInfoExtension

public ProxyCertInfoExtension(int len,
                              ProxyPolicy policy)
Generate new proxy certificate info extension with length limit len and policy policy. Use NO_PATH_LEN_LIMIT if no limit is desired.

Parameters:
len - the maximum number of proxy certificates to follow this one.
policy - the proxy policy extension.

ProxyCertInfoExtension

public ProxyCertInfoExtension()
Generate a proxy that inherits all rights and that has no cert path limitations.


ProxyCertInfoExtension

public ProxyCertInfoExtension(byte[] bytes)
                       throws java.io.IOException
Constructor that generates instance out of byte array.

Parameters:
bytes - The byte array to consider as the ASN.1 encoded proxyCertInfo extension.
Throws:
java.io.IOException - thrown in case the parsing of the byte array fails.

ProxyCertInfoExtension

public ProxyCertInfoExtension(org.bouncycastle.asn1.ASN1Sequence seq)
Read a proxyCertInfoExtension from the ASN1 sequence.

Parameters:
seq - The sequence containing the extension.
Method Detail

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. UNLIMITED if not set.

getPolicy

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

Returns:
The ProxyPolicy object.

toASN1Object

public org.bouncycastle.asn1.DERObject toASN1Object()
Specified by:
toASN1Object in class org.bouncycastle.asn1.ASN1Encodable