Package eu.europa.esig.dss.diagnostic
Class AbstractTokenProxy
java.lang.Object
eu.europa.esig.dss.diagnostic.AbstractTokenProxy
- All Implemented Interfaces:
TokenProxy
- Direct Known Subclasses:
CertificateWrapper,RevocationWrapper,SignatureWrapper,TimestampWrapper
An abstract representation of a validation object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanarePdfModificationsDetected(XmlPDFRevision pdfRevision) Checks if PDF modification detection process has found any modificationsbooleanReturns FoundCertificatesProxy to access embedded certificatesReturns FoundRevocationsProxy to access embedded revocation dataabstract byte[]Returns binaries of the token, when presentReturns the certificate chainprotected abstract XmlBasicSignatureReturns a basic signature validationprotected abstract List<XmlChainItem>Returns the token's certificate chainprotected abstract XmlSigningCertificateReturns the signing certificate of the tokenReturns the DigestAlgorithm used to create the signatureValueReturns a list of DigestMatchers used in the validation process for a signature or timestampReturns the EncryptionAlgorithm used to create the signatureReturns the length of the private key used to create the signatureValue of the tokenReturns the MaskGenerationFunction if has been used on signature creationgetModifiedFieldNames(XmlPDFRevision pdfRevision) This method returns a list of field names modified after the given revisionprotected List<XmlObjectModification>getPdfAnnotationChanges(XmlPDFRevision pdfRevision) Returns a list of changes occurred in a PDF associated with annotation(s) modificationprotected List<BigInteger>getPdfAnnotationsOverlapConcernedPages(XmlPDFRevision pdfRevision) Returns a list of page numbers concerned by an annotation overlapprotected List<XmlObjectModification>getPdfExtensionChanges(XmlPDFRevision pdfRevision) Returns a list of changes occurred in a PDF associated with a signature/document extensionprotected XmlObjectModificationsgetPdfObjectModifications(XmlPDFRevision pdfRevision) ReturnsXmlObjectModificationsfor the given revision, when presentprotected List<BigInteger>getPdfPageDifferenceConcernedPages(XmlPDFRevision pdfRevision) Returns a list of page numbers removed/added within the revisionprotected List<XmlObjectModification>getPdfSignatureOrFormFillChanges(XmlPDFRevision pdfRevision) Returns a list of changes occurred in a PDF associated with a signature creation, form fillingprotected List<XmlObjectModification>getPdfUndefinedChanges(XmlPDFRevision pdfRevision) Returns a list of undefined changes occurred in a PDFprotected List<BigInteger>getPdfVisualDifferenceConcernedPages(XmlPDFRevision pdfRevision) Returns a list of page numbers concerned by positive visual difference check resultReturns the SignatureAlgorithm used to create the signatureValueReturns the signing certificate of the token if identifiedbyte[]Returns the public key binaries of the signing certificateReturns the reference to the signing certificate present within the token (for signature or timestamp)Returns a list of all references to the signing certificate present within the token (for signature or timestamp)inthashCode()booleanChecks if the certificate chain is trusted from a Trusted Store NOTE: Not from Trusted List!booleanReturns if the signatureValue of the token is valid against the identifier signing certificate's public keybooleanReturns if the signature and all signed data is cryptographically correctbooleanReturns if a reference to the SigningCertificate is present within the token (used for signatures and timestamps)booleanReturns if the reference to the signing certificate is unique and present only oncebooleanReturns of the certificate chain is trustedtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.diagnostic.TokenProxy
getId
-
Constructor Details
-
AbstractTokenProxy
public AbstractTokenProxy()
-
-
Method Details
-
getCurrentBasicSignature
Returns a basic signature validation- Returns:
XmlBasicSignature
-
getCurrentCertificateChain
Returns the token's certificate chain- Returns:
- a list of
XmlChainItems
-
getCurrentSigningCertificate
Returns the signing certificate of the token- Returns:
XmlSigningCertificate
-
foundCertificates
Description copied from interface:TokenProxyReturns FoundCertificatesProxy to access embedded certificates- Specified by:
foundCertificatesin interfaceTokenProxy- Returns:
FoundCertificatesProxy
-
foundRevocations
Description copied from interface:TokenProxyReturns FoundRevocationsProxy to access embedded revocation data- Specified by:
foundRevocationsin interfaceTokenProxy- Returns:
FoundRevocationsProxy
-
getDigestMatchers
Description copied from interface:TokenProxyReturns a list of DigestMatchers used in the validation process for a signature or timestamp- Specified by:
getDigestMatchersin interfaceTokenProxy- Returns:
- a list of
XmlDigestMatchers
-
getCertificateChain
Description copied from interface:TokenProxyReturns the certificate chain- Specified by:
getCertificateChainin interfaceTokenProxy- Returns:
- a list of
CertificateWrapperrepresenting the certificate chain
-
isSignatureIntact
public boolean isSignatureIntact()Description copied from interface:TokenProxyReturns if the signatureValue of the token is valid against the identifier signing certificate's public key- Specified by:
isSignatureIntactin interfaceTokenProxy- Returns:
- TRUE if the signatureValue is intact, FALSE otherwise
-
isSignatureValid
public boolean isSignatureValid()Description copied from interface:TokenProxyReturns if the signature and all signed data is cryptographically correct- Specified by:
isSignatureValidin interfaceTokenProxy- Returns:
- TRUE if the signature is cryptographically valid, FALSE otherwise
-
getSignatureAlgorithm
Description copied from interface:TokenProxyReturns the SignatureAlgorithm used to create the signatureValue- Specified by:
getSignatureAlgorithmin interfaceTokenProxy- Returns:
SignatureAlgorithm
-
getEncryptionAlgorithm
Description copied from interface:TokenProxyReturns the EncryptionAlgorithm used to create the signature- Specified by:
getEncryptionAlgorithmin interfaceTokenProxy- Returns:
EncryptionAlgorithm
-
getDigestAlgorithm
Description copied from interface:TokenProxyReturns the DigestAlgorithm used to create the signatureValue- Specified by:
getDigestAlgorithmin interfaceTokenProxy- Returns:
DigestAlgorithm
-
getMaskGenerationFunction
Description copied from interface:TokenProxyReturns the MaskGenerationFunction if has been used on signature creation- Specified by:
getMaskGenerationFunctionin interfaceTokenProxy- Returns:
MaskGenerationFunction
-
getKeyLengthUsedToSignThisToken
Description copied from interface:TokenProxyReturns the length of the private key used to create the signatureValue of the token- Specified by:
getKeyLengthUsedToSignThisTokenin interfaceTokenProxy- Returns:
- {link String} key length
-
getSigningCertificate
Description copied from interface:TokenProxyReturns the signing certificate of the token if identified- Specified by:
getSigningCertificatein interfaceTokenProxy- Returns:
CertificateWrapper
-
getSigningCertificatePublicKey
public byte[] getSigningCertificatePublicKey()Description copied from interface:TokenProxyReturns the public key binaries of the signing certificate- Specified by:
getSigningCertificatePublicKeyin interfaceTokenProxy- Returns:
- public key of the signing certificate
-
isSigningCertificateReferencePresent
public boolean isSigningCertificateReferencePresent()Description copied from interface:TokenProxyReturns if a reference to the SigningCertificate is present within the token (used for signatures and timestamps)- Specified by:
isSigningCertificateReferencePresentin interfaceTokenProxy- Returns:
- TRUE if a reference to the SigningCertificate is present, FALSE otherwise
-
isSigningCertificateReferenceUnique
public boolean isSigningCertificateReferenceUnique()Description copied from interface:TokenProxyReturns if the reference to the signing certificate is unique and present only once- Specified by:
isSigningCertificateReferenceUniquein interfaceTokenProxy- Returns:
- TRUE if the reference to the signing certificate is unique, FALSE otherwise
-
getSigningCertificateReference
Description copied from interface:TokenProxyReturns the reference to the signing certificate present within the token (for signature or timestamp)- Specified by:
getSigningCertificateReferencein interfaceTokenProxy- Returns:
CertificateRefWrapperreference to the signing certificate
-
getSigningCertificateReferences
Description copied from interface:TokenProxyReturns a list of all references to the signing certificate present within the token (for signature or timestamp)- Specified by:
getSigningCertificateReferencesin interfaceTokenProxy- Returns:
- a list of
CertificateRefWrapperreferences to the signing certificate
-
isTrustedChain
public boolean isTrustedChain()Description copied from interface:TokenProxyReturns of the certificate chain is trusted- Specified by:
isTrustedChainin interfaceTokenProxy- Returns:
- TRUE if the certificate chain is trusted, FALSE otherwise
-
isCertificateChainFromTrustedStore
public boolean isCertificateChainFromTrustedStore()Checks if the certificate chain is trusted from a Trusted Store NOTE: Not from Trusted List!- Returns:
- TRUE if a certificate chain is trusted from a trusted store, FALSE otherwise
-
getBinaries
public abstract byte[] getBinaries()Returns binaries of the token, when present- Returns:
- a byte array
-
arePdfModificationsDetected
Checks if PDF modification detection process has found any modifications- Parameters:
pdfRevision-XmlPDFRevision- Returns:
- TRUE if the modification has been detected, FALSE otherwise
-
getPdfAnnotationsOverlapConcernedPages
Returns a list of page numbers concerned by an annotation overlap- Parameters:
pdfRevision-XmlPDFRevisionto check- Returns:
- a list of page numbers
-
getPdfVisualDifferenceConcernedPages
Returns a list of page numbers concerned by positive visual difference check result- Parameters:
pdfRevision-XmlPDFRevisionto check- Returns:
- a list of page numbers
-
getPdfPageDifferenceConcernedPages
Returns a list of page numbers removed/added within the revision- Parameters:
pdfRevision-XmlPDFRevisionto check- Returns:
- a list of page numbers
-
getPdfObjectModifications
ReturnsXmlObjectModificationsfor the given revision, when present- Parameters:
pdfRevision-XmlPDFRevision- Returns:
XmlObjectModifications
-
getPdfExtensionChanges
Returns a list of changes occurred in a PDF associated with a signature/document extension- Parameters:
pdfRevision-XmlPDFRevision- Returns:
- a list of
XmlObjectModifications
-
getPdfSignatureOrFormFillChanges
Returns a list of changes occurred in a PDF associated with a signature creation, form filling- Parameters:
pdfRevision-XmlPDFRevision- Returns:
- a list of
XmlObjectModifications
-
getPdfAnnotationChanges
Returns a list of changes occurred in a PDF associated with annotation(s) modification- Parameters:
pdfRevision-XmlPDFRevision- Returns:
- a list of
XmlObjectModifications
-
getPdfUndefinedChanges
Returns a list of undefined changes occurred in a PDF- Parameters:
pdfRevision-XmlPDFRevision- Returns:
- a list of
XmlObjectModifications
-
getModifiedFieldNames
This method returns a list of field names modified after the given revision- Parameters:
pdfRevision-XmlPDFRevision- Returns:
- a list of
Strings
-
toString
-
hashCode
public int hashCode() -
equals
-