Package eu.europa.esig.dss.diagnostic
Class SignatureWrapper
- java.lang.Object
-
- eu.europa.esig.dss.diagnostic.AbstractTokenProxy
-
- eu.europa.esig.dss.diagnostic.SignatureWrapper
-
- All Implemented Interfaces:
TokenProxy
public class SignatureWrapper extends AbstractTokenProxy
-
-
Constructor Summary
Constructors Constructor Description SignatureWrapper(XmlSignature signature)
-
Method Summary
-
Methods inherited from class eu.europa.esig.dss.diagnostic.AbstractTokenProxy
equals, getCertificateChain, getDigestAlgorithm, getEncryptionAlgorithm, getKeyLengthUsedToSignThisToken, getMaskGenerationFunction, getSigningCertificate, getSigningCertificatePublicKey, hashCode, isAttributePresent, isCertificateChainFromTrustedStore, isDigestValueMatch, isDigestValuePresent, isIssuerSerialMatch, isSignatureIntact, isSignatureValid, isTrustedChain
-
-
-
-
Constructor Detail
-
SignatureWrapper
public SignatureWrapper(XmlSignature signature)
-
-
Method Detail
-
getId
public String getId()
-
getDAIdentifier
public String getDAIdentifier()
-
getDigestMatchers
public List<XmlDigestMatcher> getDigestMatchers()
- Specified by:
getDigestMatchersin interfaceTokenProxy- Overrides:
getDigestMatchersin classAbstractTokenProxy
-
getMessageDigest
public XmlDigestMatcher getMessageDigest()
-
getCurrentBasicSignature
protected XmlBasicSignature getCurrentBasicSignature()
- Specified by:
getCurrentBasicSignaturein classAbstractTokenProxy
-
getCurrentCertificateChain
protected List<XmlChainItem> getCurrentCertificateChain()
- Specified by:
getCurrentCertificateChainin classAbstractTokenProxy
-
getCurrentSigningCertificate
protected XmlSigningCertificate getCurrentSigningCertificate()
- Specified by:
getCurrentSigningCertificatein classAbstractTokenProxy
-
getSignatureFilename
public String getSignatureFilename()
-
isStructuralValidationValid
public boolean isStructuralValidationValid()
-
getStructuralValidationMessage
public String getStructuralValidationMessage()
-
getDateTime
public Date getDateTime()
-
getContentType
public String getContentType()
-
getMimeType
public String getMimeType()
-
getContentHints
public String getContentHints()
-
getContentIdentifier
public String getContentIdentifier()
-
isCounterSignature
public boolean isCounterSignature()
-
getSignatureDigestReference
public XmlSignatureDigestReference getSignatureDigestReference()
-
getTimestampList
public List<TimestampWrapper> getTimestampList()
-
getTimestampListByType
public List<TimestampWrapper> getTimestampListByType(TimestampType timestampType)
-
getTimestampListByLocation
public List<TimestampWrapper> getTimestampListByLocation(TimestampLocation timestampLocation)
-
isSignatureProductionPlacePresent
public boolean isSignatureProductionPlacePresent()
-
getAddress
public String getAddress()
-
getCity
public String getCity()
-
getCountryName
public String getCountryName()
-
getPostalCode
public String getPostalCode()
-
getStateOrProvince
public String getStateOrProvince()
-
getSignatureFormat
public SignatureLevel getSignatureFormat()
-
getErrorMessage
public String getErrorMessage()
-
isSigningCertificateIdentified
public boolean isSigningCertificateIdentified()
-
getPolicyId
public String getPolicyId()
-
isZeroHashPolicy
public boolean isZeroHashPolicy()
-
isBLevelTechnicallyValid
public boolean isBLevelTechnicallyValid()
-
isThereXLevel
public boolean isThereXLevel()
-
isXLevelTechnicallyValid
public boolean isXLevelTechnicallyValid()
-
isThereALevel
public boolean isThereALevel()
-
isALevelTechnicallyValid
public boolean isALevelTechnicallyValid()
-
isThereTLevel
public boolean isThereTLevel()
-
isTLevelTechnicallyValid
public boolean isTLevelTechnicallyValid()
-
getParent
public SignatureWrapper getParent()
-
getSignatureScopes
public List<XmlSignatureScope> getSignatureScopes()
-
getSignerRoles
public List<XmlSignerRole> getSignerRoles()
Returns list of all found SignerRoles- Returns:
- list of
XmlSignerRoles
-
getClaimedRoles
public List<XmlSignerRole> getClaimedRoles()
Returns list of found ClaimedRoles- Returns:
- list of
XmlSignerRoles
-
getCertifiedRoles
public List<XmlSignerRole> getCertifiedRoles()
Returns list of found CertifiedRoles- Returns:
- list of
XmlSignerRoles
-
getSignerRoleDetails
public List<String> getSignerRoleDetails(List<XmlSignerRole> listOfSignerRoles)
Returns a list ofStrings describing the role for the givenlistOfSignerRoles- Parameters:
listOfSignerRoles- - list ofXmlSignerRoleto get string role details from- Returns:
- list of role details
-
isPolicyPresent
public boolean isPolicyPresent()
-
getPolicyProcessingError
public String getPolicyProcessingError()
-
getPolicyStatus
public boolean getPolicyStatus()
-
getPolicyDescription
public String getPolicyDescription()
Returns XMLPolicy description if it is not empty- Returns:
String
-
getPolicyNotice
public String getPolicyNotice()
-
getPolicyUrl
public String getPolicyUrl()
-
isPolicyAsn1Processable
public boolean isPolicyAsn1Processable()
-
isPolicyIdentified
public boolean isPolicyIdentified()
-
isPolicyStatus
public boolean isPolicyStatus()
-
getSignatureFieldName
public String getSignatureFieldName()
-
getSignerName
public String getSignerName()
-
getFilter
public String getFilter()
-
getSubFilter
public String getSubFilter()
-
getContactInfo
public String getContactInfo()
-
getReason
public String getReason()
-
getSignatureByteRange
public List<BigInteger> getSignatureByteRange()
-
getSignatureValue
public byte[] getSignatureValue()
-
isDocHashOnly
public boolean isDocHashOnly()
-
isHashOnly
public boolean isHashOnly()
-
getAllFoundCertificates
public List<XmlFoundCertificate> getAllFoundCertificates()
-
getRelatedCertificates
public List<XmlRelatedCertificate> getRelatedCertificates()
-
getOrphanCertificates
public List<XmlOrphanCertificate> getOrphanCertificates()
-
getAllFoundRevocations
public List<XmlFoundRevocation> getAllFoundRevocations()
-
getRelatedRevocations
public List<XmlRelatedRevocation> getRelatedRevocations()
-
getOrphanRevocations
public List<XmlOrphanRevocation> getOrphanRevocations()
-
getAllFoundRevocationRefs
public List<XmlRevocationRef> getAllFoundRevocationRefs()
-
getAllRelatedRevocationRefs
public List<XmlRevocationRef> getAllRelatedRevocationRefs()
-
getAllOrphanRevocationRefs
public List<XmlRevocationRef> getAllOrphanRevocationRefs()
-
getFoundRevocationRefsByOrigin
public List<XmlRevocationRef> getFoundRevocationRefsByOrigin(RevocationRefOrigin origin)
Returns a list of all foundXmlRevocationRefs with the givenorigin- Parameters:
origin-RevocationRefOriginto get values with- Returns:
- list of
XmlRevocationRefs
-
getRelatedRevocationsByOrigin
public Set<XmlRelatedRevocation> getRelatedRevocationsByOrigin(RevocationOrigin originType)
Returns a list of allXmlRelatedRevocations used for the signature validation process with the givenoriginType- Parameters:
originType-RevocationOriginto get values with- Returns:
- list of
XmlRelatedRevocations
-
getOrphanRevocationsByOrigin
public Set<XmlOrphanRevocation> getOrphanRevocationsByOrigin(RevocationOrigin originType)
Returns a list of allXmlOrphanRevocations found in the signature, but not used during the validation process with the givenoriginType- Parameters:
originType-RevocationOriginto get values with- Returns:
- list of
XmlOrphanRevocations
-
getRelatedRevocationsByType
public Set<XmlRelatedRevocation> getRelatedRevocationsByType(RevocationType type)
Returns a list of allXmlRelatedRevocations used for the signature validation process with the giventype- Parameters:
type-RevocationTypeto get values with- Returns:
- list of
XmlRelatedRevocations
-
getOrphanRevocationsByType
public Set<XmlOrphanRevocation> getOrphanRevocationsByType(RevocationType type)
Returns a list of allXmlOrphanRevocations found in the signature, but not used during the validation process with the giventype- Parameters:
type-RevocationTypeto get values with- Returns:
- list of
XmlOrphanRevocations
-
filterRevocationsByType
public <T extends XmlFoundRevocation> Set<T> filterRevocationsByType(List<T> revocations, RevocationType type)
Extracts revocations with a giventypefrom a list ofrevocations- Type Parameters:
T- extendsXmlFoundRevocation- Parameters:
revocations- list ofXmlFoundRevocations to get values with a defined type fromtype-RevocationTypeto get values with- Returns:
- list of
XmlFoundRevocations
-
getRevocationIds
public List<String> getRevocationIds()
Returns a list of revocation ids found in the signature- Returns:
- list of ids
-
getRevocationIdsByType
public List<String> getRevocationIdsByType(RevocationType type)
Returns a list of revocation ids found in the signature with the specifiedtype- Parameters:
type- -RevocationTypeto find revocations with- Returns:
- list of ids
-
getRevocationIdsByOrigin
public List<String> getRevocationIdsByOrigin(RevocationOrigin origin)
Returns a list of revocation ids found in the signature with the specifiedorigin- Parameters:
origin- -RevocationOriginto find revocations with- Returns:
- list of ids
-
getRevocationIdsByTypeAndOrigin
public List<String> getRevocationIdsByTypeAndOrigin(RevocationType type, RevocationOrigin origin)
Returns a list of revocation ids found in the signature with the specifiedtypeandorigin- Parameters:
type- -RevocationTypeto find revocations withorigin- -RevocationOriginto find revocations with- Returns:
- list of ids
-
getFoundCertificateIds
public List<String> getFoundCertificateIds(CertificateOrigin origin)
Returns a list of found certificate ids based on the requestedorigin- Parameters:
origin-CertificateOriginto get certificate ids for- Returns:
- list of certificate ids
-
getRelatedCertificatesByOrigin
public List<XmlRelatedCertificate> getRelatedCertificatesByOrigin(CertificateOrigin origin)
Returns a list of foundXmlRelatedCertificates with the givenorigin- Parameters:
origin-CertificateOriginto get certificates with- Returns:
- list of
XmlRelatedCertificate
-
getFoundCertificatesByRefOrigin
public List<XmlFoundCertificate> getFoundCertificatesByRefOrigin(CertificateRefOrigin origin)
Returns a list of foundXmlFoundCertificatecontaining a reference from the givenorigin- Parameters:
origin-CertificateRefOriginof a certificate reference- Returns:
- list of found
XmlFoundCertificate
-
getBinaries
public byte[] getBinaries()
- Specified by:
getBinariesin classAbstractTokenProxy
-
-