Package eu.europa.esig.dss.diagnostic
Class CertificateWrapper
java.lang.Object
eu.europa.esig.dss.diagnostic.AbstractTokenProxy
eu.europa.esig.dss.diagnostic.CertificateWrapper
- All Implemented Interfaces:
TokenProxy
- Direct Known Subclasses:
RelatedCertificateWrapper
Provides a user-friendly interface of dealing with JAXB
XmlCertificate-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Authority Information Access URLsbyte[]Returns binaries of the token, when presentReturns the certificate's Distinguished Name (by RFC 2253)Returns the certificate issuer's Distinguished Name (by RFC 2253)Returns a list of revocation data relevant to the certificateReturns expiredCertsRevocationInfo extension from TL Trusted ServicedReturns the common nameReturns the country codeReturns the certificate policies URLsReturns the CRL Distribution Points URLsprotected XmlBasicSignatureReturns a basic signature validationprotected List<XmlChainItem>Returns the token's certificate chainprotected XmlSigningCertificateReturns the signing certificate of the tokenReturns the certificate's Digest if presentgetEmail()Returns the emailReturns a string identifier of the certificate's public keyReturns a list of extended-key-usagesReturns the given namegetId()Returns the unique identifier of the objectReturns the defined key-usages for the certificateReturns the localityThis method returns a name of a Trusted Service used to apply translation for the certificate QcStatements based on the defined Mutual Recognition Agreement schemeReturns the certificate's notAfter date (the date the certificate cannot be used after)Returns the certificate's notBefore date (the date the certificate cannot be used before)Returns the OCSP Access URLsReturns the organization unitReturns the organization identifierReturns the organization nameReturns a list of QcStatements OIDs not supported by the implementation defined in a third-country Trusted List before MRA mappingReturns a list of QCLegislation Country Codes defined in a third-country Trusted List before MRA mappingReturns a list of QCTypes defined in a third-country Trusted List before MRA mappingReturns a list of QcStatements OIDs not supported by the implementationReturns the certificate policies IdsReturns the PSD2 QCStatement (id-etsi-psd2-qcStatement extension, ETSI TS 119 495)Returns the pseudoReturns QcEuRetentionPeriodReturns a list of QCLegislation Country Codes (present inside id-etsi-qcs-QcCClegislation extension)Returns the QCEuLimitValueReturns QcEuPDS LocationsReturns a list of QCTypes (present inside id-etsi-qcs-QcType extension)Returns human-readable certificate namegetRevocationDataById(String revocationId) Returns revocation data by its idReturns the semantics identifierReturns the serial number of the certificateReturns a list of sources the certificate has been obtained from (e.g.getState()Returns the stateReturns subject alternative namesReturns the subject serial number of the certificateReturns the surnamegetTitle()Returns the titleReturns a list ofTrustedServiceWrappersReturns a list ofXmlTrustedServiceProvidersbooleanChecks if the certificate has an extended-key-usage "ocspSigning" (1.3.6.1.5.5.7.3.9)booleanReturns if the certificate has id-pkix-ocsp-no-check attributebooleanReturns if the certificate has been defined as QC compliant in a third-country Trusted List before MRA mappingbooleanReturns if the certificate has been defined as supported by QSCD in a third-country Trusted List before MRA mappingbooleanReturns if the certificate is QC compliant (has id-etsi-qcs-QcCompliance extension)booleanReturns if the revocation data is available for the certificatebooleanReturns if the certificate is self-signedbooleanReturns if the certificate is supported by QSCD (has id-etsi-qcs-QcSSCD extension)booleanReturns if the certificate is trustedbooleanReturns if the Trusted List has been reached for the particular certificatebooleanReturns if the certificate contains id-etsi-ext-valassured-ST-certs extension, as defined in ETSI EN 319 412-1 "5.2 Certificate Extensions regarding Validity Assured Certificate"Methods inherited from class eu.europa.esig.dss.diagnostic.AbstractTokenProxy
arePdfModificationsDetected, equals, foundCertificates, foundRevocations, getCertificateChain, getDigestAlgorithm, getDigestMatchers, getEncryptionAlgorithm, getKeyLengthUsedToSignThisToken, getMaskGenerationFunction, getModifiedFieldNames, getPdfAnnotationChanges, getPdfAnnotationsOverlapConcernedPages, getPdfExtensionChanges, getPdfObjectModifications, getPdfPageDifferenceConcernedPages, getPdfSignatureOrFormFillChanges, getPdfUndefinedChanges, getPdfVisualDifferenceConcernedPages, getSignatureAlgorithm, getSigningCertificate, getSigningCertificatePublicKey, getSigningCertificateReference, getSigningCertificateReferences, hashCode, isCertificateChainFromTrustedStore, isSignatureIntact, isSignatureValid, isSigningCertificateReferencePresent, isSigningCertificateReferenceUnique, isTrustedChain, toString
-
Constructor Details
-
CertificateWrapper
Default constructor- Parameters:
certificate-XmlCertificateto be wrapped
-
-
Method Details
-
getId
Description copied from interface:TokenProxyReturns the unique identifier of the object- Returns:
Stringid
-
getCurrentBasicSignature
Description copied from class:AbstractTokenProxyReturns a basic signature validation- Specified by:
getCurrentBasicSignaturein classAbstractTokenProxy- Returns:
XmlBasicSignature
-
getCurrentCertificateChain
Description copied from class:AbstractTokenProxyReturns the token's certificate chain- Specified by:
getCurrentCertificateChainin classAbstractTokenProxy- Returns:
- a list of
XmlChainItems
-
getCurrentSigningCertificate
Description copied from class:AbstractTokenProxyReturns the signing certificate of the token- Specified by:
getCurrentSigningCertificatein classAbstractTokenProxy- Returns:
XmlSigningCertificate
-
isTrusted
public boolean isTrusted()Returns if the certificate is trusted- Returns:
- TRUE if the certificate is trusted, FALSE otherwise
-
isSelfSigned
public boolean isSelfSigned()Returns if the certificate is self-signed- Returns:
- TRUE if the certificate is self-signed, FALSE otherwise
-
getKeyUsages
Returns the defined key-usages for the certificate- Returns:
- a list of
KeyUsageBits
-
isRevocationDataAvailable
public boolean isRevocationDataAvailable()Returns if the revocation data is available for the certificate- Returns:
- TRUE if the revocation data is available, FALSE otherwise
-
getSources
Returns a list of sources the certificate has been obtained from (e.g. TRUSTED_LIST, SIGNATURE, AIA, etc.)- Returns:
- a list of
CertificateSourceTypes
-
getCertificateRevocationData
Returns a list of revocation data relevant to the certificate- Returns:
- a list of
CertificateRevocationWrappers
-
getRevocationDataById
Returns revocation data by its id- Parameters:
revocationId-Stringrepresenting id of a revocation data to extract- Returns:
CertificateRevocationWrapper
-
isIdPkixOcspNoCheck
public boolean isIdPkixOcspNoCheck()Returns if the certificate has id-pkix-ocsp-no-check attribute- Returns:
- TRUE if the certificate has id-pkix-ocsp-no-check attribute, FALSE otherwise
-
isIdKpOCSPSigning
public boolean isIdKpOCSPSigning()Checks if the certificate has an extended-key-usage "ocspSigning" (1.3.6.1.5.5.7.3.9)- Returns:
- TRUE if the certificate has extended-key-usage "ocspSigning", FALSE otherwise
-
getNotBefore
Returns the certificate's notBefore date (the date the certificate cannot be used before)- Returns:
DatenotBefore
-
getNotAfter
Returns the certificate's notAfter date (the date the certificate cannot be used after)- Returns:
DatenotAfter
-
getEntityKey
Returns a string identifier of the certificate's public key- Returns:
Stringpublic key's identifier
-
getCertificateTSPServiceExpiredCertsRevocationInfo
Returns expiredCertsRevocationInfo extension from TL Trusted Serviced- Returns:
DateexpiredCertsRevocationInfo extension
-
getSerialNumber
Returns the serial number of the certificate- Returns:
String
-
getSubjectSerialNumber
Returns the subject serial number of the certificate- Returns:
String
-
getTitle
Returns the title- Returns:
String
-
getCommonName
Returns the common name- Returns:
String
-
getCountryName
Returns the country code- Returns:
String
-
getGivenName
Returns the given name- Returns:
String
-
getOrganizationIdentifier
Returns the organization identifier- Returns:
String
-
getOrganizationName
Returns the organization name- Returns:
String
-
getOrganizationalUnit
Returns the organization unit- Returns:
String
-
getEmail
Returns the email- Returns:
String
-
getLocality
Returns the locality- Returns:
String
-
getState
Returns the state- Returns:
String
-
getSurname
Returns the surname- Returns:
String
-
getPseudo
Returns the pseudo- Returns:
String
-
getDigestAlgoAndValue
Returns the certificate's Digest if present- Returns:
XmlDigestAlgoAndValue
-
isTrustedListReached
public boolean isTrustedListReached()Returns if the Trusted List has been reached for the particular certificate- Returns:
- TRUE if the Trusted List has been reached, FALSE otherwise
-
getTrustServiceProviders
Returns a list ofXmlTrustedServiceProviders- Returns:
- a list of
XmlTrustedServiceProviders
-
getTrustedServices
Returns a list ofTrustedServiceWrappers- Returns:
- a list of
TrustedServiceWrappers
-
getCertificateDN
Returns the certificate's Distinguished Name (by RFC 2253)- Returns:
String
-
getCertificateIssuerDN
Returns the certificate issuer's Distinguished Name (by RFC 2253)- Returns:
String
-
getAuthorityInformationAccessUrls
Returns the Authority Information Access URLs- Returns:
- a list of
Strings
-
getCRLDistributionPoints
Returns the CRL Distribution Points URLs- Returns:
- a list of
Strings
-
getOCSPAccessUrls
Returns the OCSP Access URLs- Returns:
- a list of
Strings
-
getCpsUrls
Returns the certificate policies URLs- Returns:
- a list of
Strings
-
getPolicyIds
Returns the certificate policies Ids- Returns:
- a list of
Strings
-
isQcCompliance
public boolean isQcCompliance()Returns if the certificate is QC compliant (has id-etsi-qcs-QcCompliance extension)- Returns:
- TRUE if the certificate is QC compliant, FALSE otherwise
-
isSupportedByQSCD
public boolean isSupportedByQSCD()Returns if the certificate is supported by QSCD (has id-etsi-qcs-QcSSCD extension)- Returns:
- TRUE if the certificate is supported by QSCD, FALSE otherwise
-
getQcTypes
Returns a list of QCTypes (present inside id-etsi-qcs-QcType extension)- Returns:
- a list of
QCTypes
-
getQcLegislationCountryCodes
Returns a list of QCLegislation Country Codes (present inside id-etsi-qcs-QcCClegislation extension)- Returns:
- a list of
Strings
-
getOtherQcStatements
Returns a list of QcStatements OIDs not supported by the implementation- Returns:
- a list of
Strings
-
getMRAEnactedTrustServiceLegalIdentifier
This method returns a name of a Trusted Service used to apply translation for the certificate QcStatements based on the defined Mutual Recognition Agreement scheme- Returns:
String
-
isOriginalThirdCountryQcCompliance
public boolean isOriginalThirdCountryQcCompliance()Returns if the certificate has been defined as QC compliant in a third-country Trusted List before MRA mapping- Returns:
- TRUE if the certificate is QC compliant, FALSE otherwise
-
isOriginalThirdCountrySupportedByQSCD
public boolean isOriginalThirdCountrySupportedByQSCD()Returns if the certificate has been defined as supported by QSCD in a third-country Trusted List before MRA mapping- Returns:
- TRUE if the certificate is supported by QSCD, FALSE otherwise
-
getOriginalThirdCountryQCTypes
Returns a list of QCTypes defined in a third-country Trusted List before MRA mapping- Returns:
- a list of
QCTypes
-
getOriginalThirdCountryQcLegislationCountryCodes
Returns a list of QCLegislation Country Codes defined in a third-country Trusted List before MRA mapping- Returns:
- a list of
Strings
-
getOriginalThirdCountryOtherQcStatements
Returns a list of QcStatements OIDs not supported by the implementation defined in a third-country Trusted List before MRA mapping- Returns:
- a list of
Strings
-
getBinaries
public byte[] getBinaries()Description copied from class:AbstractTokenProxyReturns binaries of the token, when present- Specified by:
getBinariesin classAbstractTokenProxy- Returns:
- a byte array
-
getExtendedKeyUsages
Returns a list of extended-key-usages- Returns:
- a list of
XmlOIDs
-
getPSD2Info
Returns the PSD2 QCStatement (id-etsi-psd2-qcStatement extension, ETSI TS 119 495)- Returns:
PSD2InfoWrapper
-
getQCLimitValue
Returns the QCEuLimitValue- Returns:
QCLimitValueWrapper
-
getQCEuRetentionPeriod
Returns QcEuRetentionPeriod- Returns:
Integerretention period
-
getQCPDSLocations
Returns QcEuPDS Locations- Returns:
- a list of
XmlLangAndValues
-
getSemanticsIdentifier
Returns the semantics identifier- Returns:
SemanticsIdentifier
-
isValAssuredShortTermCertificate
public boolean isValAssuredShortTermCertificate()Returns if the certificate contains id-etsi-ext-valassured-ST-certs extension, as defined in ETSI EN 319 412-1 "5.2 Certificate Extensions regarding Validity Assured Certificate"- Returns:
- TRUE if the certificate is a validity assured short-term certificate, FALSE otherwise
-
getSubjectAlternativeNames
Returns subject alternative names- Returns:
- a list of
Strings
-
getReadableCertificateName
Returns human-readable certificate name- Returns:
String
-