Class X509ExtensionsGenerator
-
- All Implemented Interfaces:
public class X509ExtensionsGenerator
Generator for X.509 extensions
-
-
Constructor Summary
Constructors Constructor Description X509ExtensionsGenerator()
-
Method Summary
Modifier and Type Method Description void
reset()
Reset the generator void
addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value)
Add an extension with the given oid and the passed in value to be included in the OCTET STRING associated with the extension. void
addExtension(ASN1ObjectIdentifier oid, boolean critical, Array<byte> value)
Add an extension with the given oid and the passed in byte array to be wrapped in the OCTET STRING associated with the extension. boolean
isEmpty()
Return true if there are no extension present in this generator. X509Extensions
generate()
Generate an X509Extensions object based on the current state of the generator. -
-
Method Detail
-
reset
void reset()
Reset the generator
-
addExtension
void addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value)
Add an extension with the given oid and the passed in value to be included in the OCTET STRING associated with the extension.
- Parameters:
oid
- OID for the extension.critical
- true if critical, false otherwise.value
- the ASN.1 object to be included in the extension.
-
addExtension
void addExtension(ASN1ObjectIdentifier oid, boolean critical, Array<byte> value)
Add an extension with the given oid and the passed in byte array to be wrapped in the OCTET STRING associated with the extension.
- Parameters:
oid
- OID for the extension.critical
- true if critical, false otherwise.value
- the byte array to be wrapped.
-
isEmpty
boolean isEmpty()
Return true if there are no extension present in this generator.
- Returns:
true if empty, false otherwise
-
generate
X509Extensions generate()
Generate an X509Extensions object based on the current state of the generator.
- Returns:
an X09Extensions object.
-
-
-
-