edu.vt.middleware.crypt.x509.types
Enum KeyPurposeId

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

public enum KeyPurposeId
extends Enum<KeyPurposeId>

Represents the KeyPurposeId type described in section 4.2.1.13 of RFC 2459, which is used to indicate extended key usage.

Version:
$Revision: 425 $
Author:
Middleware Services

Enum Constant Summary
ClientAuth
          TLS Web client authentication.
CodeSigning
          Signing of downloadable executable code.
EmailProtection
          E-mail protection, e.g.
ServerAuth
          TLS Web server authentication.
SmartCardLogin
          Microsoft-specific usage for smart-card-based authentication.
TimeStamping
          Binding the hash of an object to a time from an agreed-upon time.
 
Method Summary
static KeyPurposeId getByOid(String oid)
          Gets a key purpose identifier by its OID.
 String getOid()
           
static KeyPurposeId valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeyPurposeId[] 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

ServerAuth

public static final KeyPurposeId ServerAuth
TLS Web server authentication.


ClientAuth

public static final KeyPurposeId ClientAuth
TLS Web client authentication.


CodeSigning

public static final KeyPurposeId CodeSigning
Signing of downloadable executable code.


EmailProtection

public static final KeyPurposeId EmailProtection
E-mail protection, e.g. signing and/or encryption


TimeStamping

public static final KeyPurposeId TimeStamping
Binding the hash of an object to a time from an agreed-upon time.


SmartCardLogin

public static final KeyPurposeId SmartCardLogin
Microsoft-specific usage for smart-card-based authentication.

Method Detail

values

public static KeyPurposeId[] 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 (KeyPurposeId c : KeyPurposeId.values())
    System.out.println(c);

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

valueOf

public static KeyPurposeId 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

getOid

public String getOid()
Returns:
Key purpose object identifier.

getByOid

public static KeyPurposeId getByOid(String oid)
Gets a key purpose identifier by its OID.

Parameters:
oid - OID of key identifier to retrieve.
Returns:
Key purpose ID whose OID matches given value.
Throws:
IllegalArgumentException - If there is no key purpose ID with the given OID.


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