Package org.wildfly.security.x500.cert
Class KeyUsageExtension
- java.lang.Object
-
- org.wildfly.security.x500.cert.X509CertificateExtension
-
- org.wildfly.security.x500.cert.KeyUsageExtension
-
- All Implemented Interfaces:
Extension
,ASN1Encodable
public final class KeyUsageExtension extends X509CertificateExtension
Key usage extension as defined by RFC 5280 ยง 4.2.1.3.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description KeyUsageExtension(boolean critical, KeyUsage... keyUsage)
Construct a new instance.KeyUsageExtension(KeyUsage... keyUsage)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encodeTo(ASN1Encoder encoder)
Encode this object.String
getId()
Get the OID of this extension.-
Methods inherited from class org.wildfly.security.x500.cert.X509CertificateExtension
encode, getValue, isCritical
-
-
-
-
Constructor Detail
-
KeyUsageExtension
public KeyUsageExtension(KeyUsage... keyUsage)
Construct a new instance.- Parameters:
keyUsage
- the key usage bits (must not benull
)
-
KeyUsageExtension
public KeyUsageExtension(boolean critical, KeyUsage... keyUsage)
Construct a new instance.- Parameters:
critical
-true
to mark this extension as critical,false
to mark it as non-criticalkeyUsage
- the key usage bits (must not benull
)- Since:
- 1.2.0
-
-
Method Detail
-
getId
public String getId()
Description copied from class:X509CertificateExtension
Get the OID of this extension.- Specified by:
getId
in interfaceExtension
- Specified by:
getId
in classX509CertificateExtension
- Returns:
- the OID of this extension (must not be
null
)
-
encodeTo
public void encodeTo(ASN1Encoder encoder)
Description copied from interface:ASN1Encodable
Encode this object.- Parameters:
encoder
- the encoder (must not benull
)
-
-