Enum KeyUsage
- java.lang.Object
-
- java.lang.Enum<KeyUsage>
-
- org.xwiki.crypto.pkix.params.x509certificate.extension.KeyUsage
-
- All Implemented Interfaces:
Serializable
,Comparable<KeyUsage>
public enum KeyUsage extends Enum<KeyUsage>
X.509 Certificates Key Usages.- Since:
- 5.4
- Version:
- $Id: 0064a2e59b18f0d6a29726a8b0715de5cb4666f4 $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 nameNullPointerException
- if the argument is null
-
value
public int value()
- Returns:
- the integer value representing this usage.
-
-