Class CertificateExtension
java.lang.Object
com.mulesoft.connectors.mcp.api.certificate.CertificateExtension
- All Implemented Interfaces:
Serializable
A custom Data Transfer Object (DTO) to replace the certificate extension class from the
X509Extension package.
This class encapsulates details of a certificate extension, including its OID, value, criticality, and an optional subject
alternative name. It implements Serializable to allow its instances to be serialized.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCertificateExtension(String oid, boolean criticality, byte[] value, String subjectAlternativeName) Constructs a newCertificateExtensioninstance with the specified attributes. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatHexAndAscii(byte[] value) Formats the given byte array into a hex and ASCII string representation.booleanReturns the criticality of the extension.getOid()Returns the OID of the extension.byte[]getValue()Returns the value of the extension.toString()
-
Constructor Details
-
CertificateExtension
public CertificateExtension(String oid, boolean criticality, byte[] value, String subjectAlternativeName) Constructs a newCertificateExtensioninstance with the specified attributes.- Parameters:
oid- the OID of the extensioncriticality- the criticality of the extensionvalue- the value of the extensionsubjectAlternativeName- the subject alternative name (if applicable)
-
-
Method Details
-
getOid
Returns the OID of the extension.- Returns:
- the OID of the extension
-
getValue
public byte[] getValue()Returns the value of the extension.- Returns:
- the value of the extension
-
getCriticality
public boolean getCriticality()Returns the criticality of the extension.- Returns:
- the criticality of the extension
-
toString
-
formatHexAndAscii
Formats the given byte array into a hex and ASCII string representation.- Parameters:
value- the byte array to format- Returns:
- a formatted string representation of the byte array
-