Class ExtendedKeyUsageExtension
java.lang.Object
com.itextpdf.signatures.validation.extensions.CertificateExtension
com.itextpdf.signatures.validation.extensions.ExtendedKeyUsageExtension
Class representing "Extended Key Usage" extension.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.itextpdf.signatures.validation.extensions.CertificateExtension
EXCEPTION_OCCURRED, EXPECTED_EXTENSION_ID_AND_VALUE, EXTENSION_NOT_FOUND, FOUND_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedKeyUsageExtension
(List<String> extendedKeyUsageOids) Create newExtendedKeyUsageExtension
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
existsInCertificate
(X509Certificate certificate) Check if this extension is present in the provided certificate.Returns a message with extra information about the check.Methods inherited from class com.itextpdf.signatures.validation.extensions.CertificateExtension
equals, getExtensionOid, getExtensionValue, hashCode
-
Field Details
-
ANY_EXTENDED_KEY_USAGE_OID
- See Also:
-
TIME_STAMPING
- See Also:
-
OCSP_SIGNING
- See Also:
-
CODE_SIGNING
- See Also:
-
CLIENT_AUTH
- See Also:
-
EXPECTED_KEY_USAGES
- See Also:
-
ACTUAL
- See Also:
-
NO_EXTENDED_KEY_USAGES_WERE_FOUND
- See Also:
-
ERROR_OCCURRED_DURING_RETRIEVAL
- See Also:
-
-
Constructor Details
-
ExtendedKeyUsageExtension
Create newExtendedKeyUsageExtension
instance.- Parameters:
-
extendedKeyUsageOids
- stringsList
, representing extended key usages OIDs
-
-
Method Details
-
existsInCertificate
Check if this extension is present in the provided certificate. In case ofExtendedKeyUsageExtension
, check if this extended key usage OIDs are present. Other values may be present as well.- Overrides:
-
existsInCertificate
in classCertificateExtension
- Parameters:
-
certificate
-X509Certificate
in which this extension shall be present - Returns:
-
true
if all OIDs are present in certificate extension,false
otherwise
-
getMessage
Description copied from class:CertificateExtension
Returns a message with extra information about the check.- Overrides:
-
getMessage
in classCertificateExtension
- Returns:
- a message with extra information about the check.
-