Package eu.europa.esig.dss.diagnostic
Interface TokenProxy
- All Known Implementing Classes:
AbstractSignatureWrapper
,AbstractTokenProxy
,CertificateRevocationWrapper
,CertificateWrapper
,RelatedCertificateWrapper
,RelatedRevocationWrapper
,RevocationWrapper
,SignatureWrapper
,TimestampWrapper
public interface TokenProxy
Interface providing user-friendly API for dealing with JAXB objects from a DiagnosticData
-
Method Summary
Modifier and TypeMethodDescriptionReturns FoundCertificatesProxy to access embedded certificatesReturns FoundRevocationsProxy to access embedded revocation dataReturns the certificate chainReturns 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 signaturegetId()
Returns the unique identifier of the objectReturns the length of the private key used to create the signatureValue of the tokenDeprecated.since DSS 6.1.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)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 trusted
-
Method Details
-
getId
-
isSignatureIntact
boolean isSignatureIntact()Returns if the signatureValue of the token is valid against the identifier signing certificate's public key- Returns:
- TRUE if the signatureValue is intact, FALSE otherwise
-
isSignatureValid
boolean isSignatureValid()Returns if the signature and all signed data is cryptographically correct- Returns:
- TRUE if the signature is cryptographically valid, FALSE otherwise
-
getSignatureAlgorithm
SignatureAlgorithm getSignatureAlgorithm()Returns the SignatureAlgorithm used to create the signatureValue- Returns:
SignatureAlgorithm
-
getDigestAlgorithm
DigestAlgorithm getDigestAlgorithm()Returns the DigestAlgorithm used to create the signatureValue- Returns:
DigestAlgorithm
-
getEncryptionAlgorithm
EncryptionAlgorithm getEncryptionAlgorithm()Returns the EncryptionAlgorithm used to create the signature- Returns:
EncryptionAlgorithm
-
getMaskGenerationFunction
Deprecated.since DSS 6.1. Please use#getEncryptionAlgorithm
method instead to differentiate between mask generation function use (i.e. RSA for none MGF, RSASSA-PSS for MGF1)Returns the MaskGenerationFunction if has been used on signature creation- Returns:
MaskGenerationFunction
-
getKeyLengthUsedToSignThisToken
String getKeyLengthUsedToSignThisToken()Returns the length of the private key used to create the signatureValue of the token- Returns:
- {link String} key length
-
getSigningCertificate
CertificateWrapper getSigningCertificate()Returns the signing certificate of the token if identified- Returns:
CertificateWrapper
-
isSigningCertificateReferencePresent
boolean isSigningCertificateReferencePresent()Returns if a reference to the SigningCertificate is present within the token (used for signatures and timestamps)- Returns:
- TRUE if a reference to the SigningCertificate is present, FALSE otherwise
-
isSigningCertificateReferenceUnique
boolean isSigningCertificateReferenceUnique()Returns if the reference to the signing certificate is unique and present only once- Returns:
- TRUE if the reference to the signing certificate is unique, FALSE otherwise
-
getSigningCertificateReference
CertificateRefWrapper getSigningCertificateReference()Returns the reference to the signing certificate present within the token (for signature or timestamp)- Returns:
CertificateRefWrapper
reference to the signing certificate
-
getSigningCertificateReferences
List<CertificateRefWrapper> getSigningCertificateReferences()Returns a list of all references to the signing certificate present within the token (for signature or timestamp)- Returns:
- a list of
CertificateRefWrapper
references to the signing certificate
-
getSigningCertificatePublicKey
byte[] getSigningCertificatePublicKey()Returns the public key binaries linked to a private key used to create the signature, when a signing-certificate is not available.- Returns:
- public key of the signer
-
getCertificateChain
List<CertificateWrapper> getCertificateChain()Returns the certificate chain- Returns:
- a list of
CertificateWrapper
representing the certificate chain
-
isTrustedChain
boolean isTrustedChain()Returns of the certificate chain is trusted- Returns:
- TRUE if the certificate chain is trusted, FALSE otherwise
-
getDigestMatchers
List<XmlDigestMatcher> getDigestMatchers()Returns a list of DigestMatchers used in the validation process for a signature or timestamp- Returns:
- a list of
XmlDigestMatcher
s
-
foundCertificates
FoundCertificatesProxy foundCertificates()Returns FoundCertificatesProxy to access embedded certificates- Returns:
FoundCertificatesProxy
-
foundRevocations
FoundRevocationsProxy foundRevocations()Returns FoundRevocationsProxy to access embedded revocation data- Returns:
FoundRevocationsProxy
-