org.xwiki.crypto.pkix.params.x509certificate.extension
Enum KeyUsage

java.lang.Object
  extended by java.lang.Enum<KeyUsage>
      extended by org.xwiki.crypto.pkix.params.x509certificate.extension.KeyUsage
All Implemented Interfaces:
Serializable, Comparable<KeyUsage>

@Unstable
public enum KeyUsage
extends Enum<KeyUsage>

X.509 Certificates Key Usages.

Since:
5.4
Version:
$Id: 2a52d2588a7a42e4ef060db6c1f097090ceb2250 $

Enum Constant Summary
cRLSign
          for CA signing certificates that are used to sign CRLs.
dataEncipherment
          when the subject's public key is used to encrypt user data instead of key material.
decipherOnly
          if the public key is used only for deciphering data.
digitalSignature
          for SSL client certificates, S/MIME signing certificates, and object-signing certificates.
encipherOnly
          if the public key is used only for enciphering data.
keyAgreement
          when the subject's public key is used for key agreement.
keyCertSign
          for all CA signing certificates.
keyEncipherment
          or SSL server certificates and S/MIME encryption certificates.
nonRepudiation
          for some S/MIME signing certificates and object-signing certificates.
 
Field Summary
static String OID
          OID of KeyUsage.
 
Method Summary
 int value()
           
static KeyUsage valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeyUsage[] 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

digitalSignature

public static final KeyUsage digitalSignature
for SSL client certificates, S/MIME signing certificates, and object-signing certificates.


nonRepudiation

public static final KeyUsage nonRepudiation
for some S/MIME signing certificates and object-signing certificates.


keyEncipherment

public static final KeyUsage keyEncipherment
or SSL server certificates and S/MIME encryption certificates.


dataEncipherment

public static final KeyUsage dataEncipherment
when the subject's public key is used to encrypt user data instead of key material.


keyAgreement

public static final KeyUsage keyAgreement
when the subject's public key is used for key agreement.


keyCertSign

public static final KeyUsage keyCertSign
for all CA signing certificates.


cRLSign

public static final KeyUsage cRLSign
for CA signing certificates that are used to sign CRLs.


encipherOnly

public static final KeyUsage encipherOnly
if the public key is used only for enciphering data. If this bit is set, keyAgreement should also be set.


decipherOnly

public static final KeyUsage decipherOnly
if the public key is used only for deciphering data. If this bit is set, keyAgreement should also be set.

Field Detail

OID

public static final String OID
OID of KeyUsage.

Method Detail

values

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

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

valueOf

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

value

public int value()
Returns:
the integer value representing this usage.


Copyright © 2004–2014 XWiki. All rights reserved.