edu.vt.middleware.crypt.x509
Enum ExtensionType

java.lang.Object
  extended by java.lang.Enum<ExtensionType>
      extended by edu.vt.middleware.crypt.x509.ExtensionType
All Implemented Interfaces:
Serializable, Comparable<ExtensionType>

public enum ExtensionType
extends Enum<ExtensionType>

Enumeration of X.509v3 extension fields defined in section 4.2 of RFC 2459.

Version:
$Revision: $
Author:
Middleware Services

Enum Constant Summary
AuthorityInformationAccess
          AuthorityInfoAccess extension field.
AuthorityKeyIdentifier
          AuthorityKeyIdentifier extension field.
BasicConstraints
          BasicConstraints extension field.
CertificatePolicies
          CertificatePolicies extension field.
CRLDistributionPoints
          CRLDistributionPoints extension field.
ExtendedKeyUsage
          ExtendedKeyUsage extension field.
IssuerAlternativeName
          IssuerAlternativeName extension field.
KeyUsage
          KeyUsage extension field.
NameConstraints
          NameConstraints extension field.
PolicyConstraints
          PolicyConstraints extension field.
PolicyMappings
          PolicyMappings extension field.
PrivateKeyUsagePeriod
          PrivateKeyUsage extension field.
SubjectAlternativeName
          SubjectAlternativeName extension field.
SubjectDirectoryAttributes
          SubjectDirectoryAttributes extension field.
SubjectKeyIdentifier
          SubjectKeyIdentifier extension field.
 
Method Summary
static ExtensionType fromName(String name)
          Gets the extension by name.
static ExtensionType fromOid(String oid)
          Gets the extension by OID.
 String getOid()
           
 boolean isCritical()
           
static ExtensionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ExtensionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AuthorityInformationAccess

public static final ExtensionType AuthorityInformationAccess
AuthorityInfoAccess extension field.


AuthorityKeyIdentifier

public static final ExtensionType AuthorityKeyIdentifier
AuthorityKeyIdentifier extension field.


BasicConstraints

public static final ExtensionType BasicConstraints
BasicConstraints extension field.


CertificatePolicies

public static final ExtensionType CertificatePolicies
CertificatePolicies extension field.


CRLDistributionPoints

public static final ExtensionType CRLDistributionPoints
CRLDistributionPoints extension field.


ExtendedKeyUsage

public static final ExtensionType ExtendedKeyUsage
ExtendedKeyUsage extension field.


IssuerAlternativeName

public static final ExtensionType IssuerAlternativeName
IssuerAlternativeName extension field.


KeyUsage

public static final ExtensionType KeyUsage
KeyUsage extension field.


NameConstraints

public static final ExtensionType NameConstraints
NameConstraints extension field.


PolicyConstraints

public static final ExtensionType PolicyConstraints
PolicyConstraints extension field.


PolicyMappings

public static final ExtensionType PolicyMappings
PolicyMappings extension field.


PrivateKeyUsagePeriod

public static final ExtensionType PrivateKeyUsagePeriod
PrivateKeyUsage extension field.


SubjectAlternativeName

public static final ExtensionType SubjectAlternativeName
SubjectAlternativeName extension field.


SubjectKeyIdentifier

public static final ExtensionType SubjectKeyIdentifier
SubjectKeyIdentifier extension field.


SubjectDirectoryAttributes

public static final ExtensionType SubjectDirectoryAttributes
SubjectDirectoryAttributes extension field.

Method Detail

values

public static ExtensionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ExtensionType c : ExtensionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ExtensionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromOid

public static ExtensionType fromOid(String oid)
Gets the extension by OID.

Parameters:
oid - Extension OID value.
Returns:
Extension with given OID value.
Throws:
IllegalArgumentException - If no extension with given OID exists.

fromName

public static ExtensionType fromName(String name)
Gets the extension by name.

Parameters:
name - Case-sensitive X.509v3 extension name. The acceptable case of extension names is governed by conventions in RFC 2459.
Returns:
Extension with given name.
Throws:
IllegalArgumentException - If no extension with given name exists.

isCritical

public boolean isCritical()
Returns:
True if extension MUST or SHOULD be marked critical under general circumstances according to RFC 2459, false otherwise.

getOid

public String getOid()
Returns:
OID value of extension field.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.