public final class OCSPNonceExtension extends Extension
Extensioncritical, extensionId, extensionValue| Constructor and Description |
|---|
OCSPNonceExtension(boolean isCritical,
byte[] incomingNonce)
Create an
OCSPNonceExtension by providing a nonce value and
criticality setting. |
OCSPNonceExtension(boolean isCritical,
int length)
Create an
OCSPNonceExtension by providing the nonce length and
criticality setting. |
OCSPNonceExtension(byte[] incomingNonce)
Create an
OCSPNonceExtension by providing a nonce value. |
OCSPNonceExtension(int length)
Create an
OCSPNonceExtension by providing the nonce length. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName()
Return the name of the extension as a
String |
byte[] |
getNonceValue()
Return the nonce bytes themselves, without any DER encoding.
|
java.lang.String |
toString()
Returns a printable representation of the
OCSPNonceExtension. |
encode, encode, equals, getExtensionId, getExtensionValue, getId, getValue, hashCode, isCritical, newExtensionpublic OCSPNonceExtension(int length)
throws java.io.IOException
OCSPNonceExtension by providing the nonce length.
The criticality is set to false, and the OID for the extension will
be the value defined by "id-pkix-ocsp-nonce" from RFC 6960.length - the number of random bytes composing the noncejava.io.IOException - if any errors happen during encoding of the
extension.java.lang.IllegalArgumentException - if length is not a positive integer.public OCSPNonceExtension(boolean isCritical,
int length)
throws java.io.IOException
OCSPNonceExtension by providing the nonce length and
criticality setting. The OID for the extension will
be the value defined by "id-pkix-ocsp-nonce" from RFC 6960.isCritical - a boolean flag indicating whether the criticality bit
is set for this extensionlength - the number of random bytes composing the noncejava.io.IOException - if any errors happen during encoding of the
extension.java.lang.IllegalArgumentException - if length is not in the range of 1 to 32.public OCSPNonceExtension(byte[] incomingNonce)
throws java.io.IOException
OCSPNonceExtension by providing a nonce value.
The criticality is set to false, and the OID for the extension will
be the value defined by "id-pkix-ocsp-nonce" from RFC 6960.incomingNonce - The nonce data to be set for the extension. This
must be a non-null array of at least one byte long.java.io.IOException - if any errors happen during encoding of the
extension.java.lang.IllegalArgumentException - if the incomingNonce length is not a
positive integer.java.lang.NullPointerException - if the incomingNonce is null.public OCSPNonceExtension(boolean isCritical,
byte[] incomingNonce)
throws java.io.IOException
OCSPNonceExtension by providing a nonce value and
criticality setting. The OID for the extension will
be the value defined by "id-pkix-ocsp-nonce" from RFC 6960.isCritical - a boolean flag indicating whether the criticality bit
is set for this extensionincomingNonce - The nonce data to be set for the extension. This
must be a non-null array of at least one byte long and can be up to
32 bytes.java.io.IOException - if any errors happen during encoding of the
extension.java.lang.IllegalArgumentException - if the incomingNonce length is not
in the range of 1 to 32.java.lang.NullPointerException - if the incomingNonce is null.