Class CertificateExtension
java.lang.Object
com.itextpdf.signatures.validation.extensions.CertificateExtension
- Direct Known Subclasses:
-
DynamicCertificateExtension
,ExtendedKeyUsageExtension
,KeyUsageExtension
Class representing certificate extension with all the information required for validation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCertificateExtension
(String extensionOid, IASN1Primitive extensionValue) Create new instance ofCertificateExtension
using provided extension OID and value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
existsInCertificate
(X509Certificate certificate) Check if this extension is present in the provided certificate.Get extension OIDGet extension valueReturns a message with extra information about the check.int
hashCode()
-
Field Details
-
EXCEPTION_OCCURRED
- See Also:
-
EXTENSION_NOT_FOUND
- See Also:
-
FOUND_VALUE
- See Also:
-
EXPECTED_EXTENSION_ID_AND_VALUE
- See Also:
-
-
Constructor Details
-
CertificateExtension
Create new instance ofCertificateExtension
using provided extension OID and value.- Parameters:
-
extensionOid
-String
, which represents extension OID -
extensionValue
-IASN1Primitive
, which represents extension value
-
-
Method Details
-
getExtensionValue
Get extension value- Returns:
-
IASN1Primitive
, which represents extension value
-
getExtensionOid
Get extension OID- Returns:
-
String
, which represents extension OID
-
getMessage
Returns a message with extra information about the check.- Returns:
- a message with extra information about the check.
-
existsInCertificate
Check if this extension is present in the provided certificate.This method doesn't always require complete extension value equality, instead whenever possible it checks that this extension is present in the certificate.
- Parameters:
-
certificate
-X509Certificate
in which this extension shall be present - Returns:
-
true
if extension if present,false
otherwise
-
equals
-
hashCode
public int hashCode()
-