public class ProxyCertInfoExtension
extends org.bouncycastle.asn1.ASN1Object
ProxyCertInfoExtension ::= SEQUENCE {
pCPathLenConstraint ProxyCertPathLengthConstraint OPTIONAL,
proxyPolicy ProxyPolicy }
ProxyCertPathLengthConstraint ::= INTEGER
| Modifier and Type | Field and Description |
|---|---|
static String |
DRAFT_EXTENSION_OID
The oid of the rfc draft proxy cert extension.
|
static String |
RFC_EXTENSION_OID
The oid of the proxy cert info extension, defined in the RFC 3820.
|
| Constructor and Description |
|---|
ProxyCertInfoExtension()
Generate a proxy that inherits all rights and that has no cert path
length 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 pathLen,
ProxyPolicy policy)
Generate new proxy certificate info extension with length limit len
and policy policy.
|
| Modifier and Type | Method and Description |
|---|---|
static ProxyCertInfoExtension |
getInstance(X509Certificate cert)
Tries to generate
ProxyCertInfoExtension object from the
provided certificate. |
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.ASN1Primitive |
toASN1Primitive() |
public static final String RFC_EXTENSION_OID
public static final String DRAFT_EXTENSION_OID
public ProxyCertInfoExtension(int pathLen,
ProxyPolicy policy)
pathLen - the maximum number of proxy certificates to follow
this one. If -1 is used then no limit will be set.policy - the proxy policy extension.public ProxyCertInfoExtension()
public ProxyCertInfoExtension(byte[] bytes)
throws IOException
bytes - The byte array to consider as the ASN.1 encoded
proxyCertInfo extension.IOException - thrown in case the parsing of the byte array fails.public ProxyCertInfoExtension(org.bouncycastle.asn1.ASN1Sequence seq)
throws IOException
seq - The sequence containing the extension.IOException - IO exceptionpublic static ProxyCertInfoExtension getInstance(X509Certificate cert) throws IOException
ProxyCertInfoExtension object from the
provided certificate. Returns null if the certificate has no proxy extension
(draft or rfc).cert - certificateIOException - IO exceptionpublic int getProxyPathLimit()
public ProxyPolicy getPolicy()
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
toASN1Primitive in interface org.bouncycastle.asn1.ASN1EncodabletoASN1Primitive in class org.bouncycastle.asn1.ASN1ObjectCopyright © 2012–2016 European Middleware Initiative. All rights reserved.