Class ExtendedKeyUsages
- java.lang.Object
-
- org.xwiki.crypto.pkix.params.x509certificate.extension.ExtendedKeyUsages
-
public class ExtendedKeyUsages extends Object
Extended Key Usage.- Since:
- 5.4
- Version:
- $Id: 09bbc4d8d95e1d95a019b32f0b045323af103c7f $
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANY_EXTENDED_KEY_USAGE
{ 2 5 29 37 0 }.static String
CLIENT_AUTH
Client authentication { 1 3 6 1 5 5 7 3 2 }.static String
CODE_SIGNING
Code signing { 1 3 6 1 5 5 7 3 3 }.static String
EMAIL_PROTECTION
Email protection { 1 3 6 1 5 5 7 3 4 }.static String
OCSP_SIGNING
OCSP Signing { 1 3 6 1 5 5 7 3 9 }.static String
OID
OID of ExtendedKeyUsage.static String
SERVER_AUTH
Server authentication { 1 3 6 1 5 5 7 3 1 }.static String
TIME_STAMPING
Timestamping { 1 3 6 1 5 5 7 3 8 }.
-
Constructor Summary
Constructors Constructor Description ExtendedKeyUsages(String[] usages)
Constructor from string array.ExtendedKeyUsages(Collection<String> usages)
Constructor from string array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getAll()
boolean
hasUsage(String usage)
Check if a given usage is authorized.boolean
isEmpty()
-
-
-
Field Detail
-
OID
public static final String OID
OID of ExtendedKeyUsage.
-
ANY_EXTENDED_KEY_USAGE
public static final String ANY_EXTENDED_KEY_USAGE
{ 2 5 29 37 0 }.- See Also:
- Constant Field Values
-
SERVER_AUTH
public static final String SERVER_AUTH
Server authentication { 1 3 6 1 5 5 7 3 1 }.- See Also:
- Constant Field Values
-
CLIENT_AUTH
public static final String CLIENT_AUTH
Client authentication { 1 3 6 1 5 5 7 3 2 }.- See Also:
- Constant Field Values
-
CODE_SIGNING
public static final String CODE_SIGNING
Code signing { 1 3 6 1 5 5 7 3 3 }.- See Also:
- Constant Field Values
-
EMAIL_PROTECTION
public static final String EMAIL_PROTECTION
Email protection { 1 3 6 1 5 5 7 3 4 }.- See Also:
- Constant Field Values
-
TIME_STAMPING
public static final String TIME_STAMPING
Timestamping { 1 3 6 1 5 5 7 3 8 }.- See Also:
- Constant Field Values
-
OCSP_SIGNING
public static final String OCSP_SIGNING
OCSP Signing { 1 3 6 1 5 5 7 3 9 }.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExtendedKeyUsages
public ExtendedKeyUsages(String[] usages)
Constructor from string array.- Parameters:
usages
- array of usage OID to add.
-
ExtendedKeyUsages
public ExtendedKeyUsages(Collection<String> usages)
Constructor from string array.- Parameters:
usages
- list of usage OID to add.
-
-
Method Detail
-
hasUsage
public boolean hasUsage(String usage)
Check if a given usage is authorized.- Parameters:
usage
- the usage oid to check.- Returns:
- true if the usage is authorized.
-
isEmpty
public boolean isEmpty()
- Returns:
- true if no extended usage has been added.
-
-