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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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 tokenDeprecated.Returns 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)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
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
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
Deprecated.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 linked to a private key used to create the signature, when a signing-certificate is not available.- Specified by:
getSigningCertificatePublicKeyin interfaceTokenProxy- Returns:
- public key of the signer
-
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
-
toString
-
hashCode
-
equals
-