Class CertificateExtension
java.lang.Object
com.itextpdf.signatures.validation.v1.extensions.CertificateExtension
- Direct Known Subclasses:
-
BasicConstraintsExtension
,ExtendedKeyUsageExtension
,KeyUsageExtension
Class representing certificate extension with all the information required for validation.
-
Constructor Summary
ConstructorDescriptionCertificateExtension
(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 valueint
hashCode()
-
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
-
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()
-