| java.lang.Object org.apache.harmony.security.x509.ExtensionValue org.apache.harmony.security.x509.NameConstraints
NameConstraints | public class NameConstraints extends ExtensionValue (Code) | | The class encapsulates the ASN.1 DER encoding/decoding work
with the following structure which is a part of X.509 certificate
(as specified in RFC 3280 -
Internet X.509 Public Key Infrastructure.
Certificate and Certificate Revocation List (CRL) Profile.
http://www.ietf.org/rfc/rfc3280.txt):
NameConstraints ::= SEQUENCE {
permittedSubtrees [0] GeneralSubtrees OPTIONAL,
excludedSubtrees [1] GeneralSubtrees OPTIONAL }
GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
See Also: org.apache.harmony.security.x509.GeneralSubtree See Also: org.apache.harmony.security.x509.GeneralName |
Field Summary | |
final public static ASN1Sequence | ASN1 X.509 NameConstraints encoder/decoder. |
Method Summary | |
public static NameConstraints | decode(byte[] encoding) | public void | dumpValue(StringBuffer buffer, String prefix) Places the string representation of extension value
into the StringBuffer object. | public byte[] | getEncoded() Returns ASN.1 encoded form of this X.509 NameConstraints value. | public boolean | isAcceptable(X509Certificate cert) Apply the name restrictions specified by this NameConstraints
instance to the subject distinguished name and subject alternative
names of specified X509Certificate. | public boolean | isAcceptable(List names) Check if this list of names is acceptable accoring to this
NameConstraints object. |
NameConstraints | public NameConstraints()(Code) | | Default ctor
|
NameConstraints | public NameConstraints(GeneralSubtrees permittedSubtrees, GeneralSubtrees excludedSubtrees)(Code) | | Constructs NameConstrains object
permittedSubtrees: GeneralSubtrees excludedSubtrees: GeneralSubtrees |
dumpValue | public void dumpValue(StringBuffer buffer, String prefix)(Code) | | Places the string representation of extension value
into the StringBuffer object.
|
getEncoded | public byte[] getEncoded()(Code) | | Returns ASN.1 encoded form of this X.509 NameConstraints value.
a byte array containing ASN.1 encode form. |
isAcceptable | public boolean isAcceptable(X509Certificate cert)(Code) | | Apply the name restrictions specified by this NameConstraints
instance to the subject distinguished name and subject alternative
names of specified X509Certificate. Restrictions apply only
if specified name form is present in the certificate.
The restrictions are applied according the RFC 3280
(see 4.2.1.11 Name Constraints), excepting that restrictions are applied
and to CA certificates, and to certificates which issuer and subject
names the same (i.e. method does not check if it CA's certificate or not,
or if the names differ or not. This check if it is needed should be done
by caller before calling this method).
Parameters: X509Certificate - : X.509 Certificate to be checked. true, if the certificate is acceptable accordingthese NameConstraints restrictions, and false otherwise. |
isAcceptable | public boolean isAcceptable(List names)(Code) | | Check if this list of names is acceptable accoring to this
NameConstraints object.
names: List |
Fields inherited from org.apache.harmony.security.x509.ExtensionValue | protected byte[] encoding(Code)(Java Doc)
|
|
|