Package eu.europa.esig.dss.diagnostic
Class AbstractTokenProxy
java.lang.Object
eu.europa.esig.dss.diagnostic.AbstractTokenProxy
- All Implemented Interfaces:
TokenProxy
- Direct Known Subclasses:
AbstractSignatureWrapper
,CertificateWrapper
,RevocationWrapper
An abstract representation of a validation object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns FoundCertificatesProxy to access embedded certificatesReturns FoundRevocationsProxy to access embedded revocation dataabstract byte[]
Returns binaries of the token, when presentReturns the certificate chainprotected abstract XmlBasicSignature
Returns a basic signature validationprotected abstract List<XmlChainItem>
Returns the token's certificate chainprotected abstract XmlSigningCertificate
Returns 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 creationReturns the SignatureAlgorithm used to create the signatureValueReturns the signing certificate of the token if identifiedbyte[]
Returns the public key binaries linked to a private key used to create the signature, when a signing-certificate is not available.Returns 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)int
hashCode()
boolean
Checks if the certificate chain is trusted from a Trusted Store NOTE: Not from Trusted List!boolean
Returns if the signatureValue of the token is valid against the identifier signing certificate's public keyboolean
Returns if the signature and all signed data is cryptographically correctboolean
Returns if a reference to the SigningCertificate is present within the token (used for signatures and timestamps)boolean
Returns if the reference to the signing certificate is unique and present only onceboolean
Returns of the certificate chain is trustedtoString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.diagnostic.TokenProxy
getId
-
Constructor Details
-
AbstractTokenProxy
protected AbstractTokenProxy()Default constructor
-
-
Method Details
-
getCurrentBasicSignature
Returns a basic signature validation- Returns:
XmlBasicSignature
-
getCurrentCertificateChain
Returns the token's certificate chain- Returns:
- a list of
XmlChainItem
s
-
getCurrentSigningCertificate
Returns the signing certificate of the token- Returns:
XmlSigningCertificate
-
foundCertificates
Description copied from interface:TokenProxy
Returns FoundCertificatesProxy to access embedded certificates- Specified by:
foundCertificates
in interfaceTokenProxy
- Returns:
FoundCertificatesProxy
-
foundRevocations
Description copied from interface:TokenProxy
Returns FoundRevocationsProxy to access embedded revocation data- Specified by:
foundRevocations
in interfaceTokenProxy
- Returns:
FoundRevocationsProxy
-
getDigestMatchers
Description copied from interface:TokenProxy
Returns a list of DigestMatchers used in the validation process for a signature or timestamp- Specified by:
getDigestMatchers
in interfaceTokenProxy
- Returns:
- a list of
XmlDigestMatcher
s
-
getCertificateChain
Description copied from interface:TokenProxy
Returns the certificate chain- Specified by:
getCertificateChain
in interfaceTokenProxy
- Returns:
- a list of
CertificateWrapper
representing the certificate chain
-
isSignatureIntact
public boolean isSignatureIntact()Description copied from interface:TokenProxy
Returns if the signatureValue of the token is valid against the identifier signing certificate's public key- Specified by:
isSignatureIntact
in interfaceTokenProxy
- Returns:
- TRUE if the signatureValue is intact, FALSE otherwise
-
isSignatureValid
public boolean isSignatureValid()Description copied from interface:TokenProxy
Returns if the signature and all signed data is cryptographically correct- Specified by:
isSignatureValid
in interfaceTokenProxy
- Returns:
- TRUE if the signature is cryptographically valid, FALSE otherwise
-
getSignatureAlgorithm
Description copied from interface:TokenProxy
Returns the SignatureAlgorithm used to create the signatureValue- Specified by:
getSignatureAlgorithm
in interfaceTokenProxy
- Returns:
SignatureAlgorithm
-
getEncryptionAlgorithm
Description copied from interface:TokenProxy
Returns the EncryptionAlgorithm used to create the signature- Specified by:
getEncryptionAlgorithm
in interfaceTokenProxy
- Returns:
EncryptionAlgorithm
-
getDigestAlgorithm
Description copied from interface:TokenProxy
Returns the DigestAlgorithm used to create the signatureValue- Specified by:
getDigestAlgorithm
in interfaceTokenProxy
- Returns:
DigestAlgorithm
-
getMaskGenerationFunction
Description copied from interface:TokenProxy
Returns the MaskGenerationFunction if has been used on signature creation- Specified by:
getMaskGenerationFunction
in interfaceTokenProxy
- Returns:
MaskGenerationFunction
-
getKeyLengthUsedToSignThisToken
Description copied from interface:TokenProxy
Returns the length of the private key used to create the signatureValue of the token- Specified by:
getKeyLengthUsedToSignThisToken
in interfaceTokenProxy
- Returns:
- {link String} key length
-
getSigningCertificate
Description copied from interface:TokenProxy
Returns the signing certificate of the token if identified- Specified by:
getSigningCertificate
in interfaceTokenProxy
- Returns:
CertificateWrapper
-
getSigningCertificatePublicKey
public byte[] getSigningCertificatePublicKey()Description copied from interface:TokenProxy
Returns the public key binaries linked to a private key used to create the signature, when a signing-certificate is not available.- Specified by:
getSigningCertificatePublicKey
in interfaceTokenProxy
- Returns:
- public key of the signer
-
isSigningCertificateReferencePresent
public boolean isSigningCertificateReferencePresent()Description copied from interface:TokenProxy
Returns if a reference to the SigningCertificate is present within the token (used for signatures and timestamps)- Specified by:
isSigningCertificateReferencePresent
in interfaceTokenProxy
- Returns:
- TRUE if a reference to the SigningCertificate is present, FALSE otherwise
-
isSigningCertificateReferenceUnique
public boolean isSigningCertificateReferenceUnique()Description copied from interface:TokenProxy
Returns if the reference to the signing certificate is unique and present only once- Specified by:
isSigningCertificateReferenceUnique
in interfaceTokenProxy
- Returns:
- TRUE if the reference to the signing certificate is unique, FALSE otherwise
-
getSigningCertificateReference
Description copied from interface:TokenProxy
Returns the reference to the signing certificate present within the token (for signature or timestamp)- Specified by:
getSigningCertificateReference
in interfaceTokenProxy
- Returns:
CertificateRefWrapper
reference to the signing certificate
-
getSigningCertificateReferences
Description copied from interface:TokenProxy
Returns a list of all references to the signing certificate present within the token (for signature or timestamp)- Specified by:
getSigningCertificateReferences
in interfaceTokenProxy
- Returns:
- a list of
CertificateRefWrapper
references to the signing certificate
-
isTrustedChain
public boolean isTrustedChain()Description copied from interface:TokenProxy
Returns of the certificate chain is trusted- Specified by:
isTrustedChain
in 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
-
toString
-
hashCode
public int hashCode() -
equals
-