public class VerifyResultWrapper extends java.lang.Object implements VerifyResult
Constructor and Description |
---|
VerifyResultWrapper(VerifyResult newResult) |
Modifier and Type | Method and Description |
---|---|
SignatureCheck |
getCertificateCheck()
Returns the result of the certificate check.
|
java.lang.String |
getHashInputData()
Returns the hash input data as returned by MOA as Base64-encoded String.
|
java.lang.Object |
getInternalSignatureInformation()
Returns additional, internal information about the found signature.
|
SignatureCheck |
getManifestCheckCode()
Returns the result of the manifest check.
|
java.util.List |
getNonTextualObjects()
Returns a list<
NonTextObjectInfo > of non textual objects in the pdf document. |
java.lang.String |
getPublicAuthorityCode()
Returns the public authority code or
null . |
java.util.List |
getPublicProperties()
Returns a list of Strings each stating one public property of the
certificate.
|
XMLDsigData |
getReconstructedXMLDsig()
Get the reconstructed xmldsig XML data.
|
java.lang.String |
getSignatureType()
Returns the type of this signature (binary/textual).
|
DataSource |
getSignedData()
Returns the DataSource providing the data that was signed.
|
java.security.cert.X509Certificate |
getSignerCertificate()
Returns the certificate of the signer.
|
java.util.Date |
getSigningTime()
Returns the signing time, which is the time when the signature was created.
|
java.lang.String |
getTimeStampValue()
Returns the embedded /TimeStamp value (b64 encoded) from the signature if available.
|
SignatureCheck |
getValueCheckCode()
Returns the result of the value (and hash) check.
|
PdfAsException |
getVerificationException()
Returns a verification exception if any.
|
java.util.Date |
getVerificationTime()
Returns the verification time, which is the time when the signature was
verified.
|
boolean |
hasNonTextualObjects()
Returns
true if non textual objects have been found, false if not. |
boolean |
isPublicAuthority()
Returns
true if public authority is indicated. |
boolean |
isQualifiedCertificate()
Returns true, if the signer's certificate is a qualified certificate.
|
boolean |
isVerificationDone()
Returns if the verification was possible or could not even be startet.
|
void |
setNonTextualObjects(java.util.List nonTextualObjects) |
public VerifyResultWrapper(VerifyResult newResult)
public java.lang.String getSignatureType()
SignatureInformation
May be Constants.SIGNATURE_TYPE_BINARY
or
Constants.SIGNATURE_TYPE_TEXTUAL
.
getSignatureType
in interface SignatureInformation
public DataSource getSignedData()
SignatureInformation
Note that this is the signed data as sent to the verification device by PDF-AS. The verification device (e.g. MOA) may perform several other transformations on the data before feeding it to the signature hash function. To get the actual hashed data use the ReturnHashInputData mechanism (which is very slow).
getSignedData
in interface SignatureInformation
VerifyParameters.setReturnHashInputData(boolean)
,
VerifyResult.getHashInputData()
public java.security.cert.X509Certificate getSignerCertificate()
SignatureInformation
Information like subject name, issuer name or serial number can be retrieved form this certificate.
getSignerCertificate
in interface SignatureInformation
public java.util.Date getSigningTime()
SignatureInformation
getSigningTime
in interface SignatureInformation
public java.lang.Object getInternalSignatureInformation()
SignatureInformation
Note that this provides a way for developers to gather core information about the signature. What information is returned strongly depends on the core implementation.
getInternalSignatureInformation
in interface SignatureInformation
public java.lang.String getTimeStampValue()
SignatureInformation
getTimeStampValue
in interface SignatureInformation
public void setNonTextualObjects(java.util.List nonTextualObjects)
setNonTextualObjects
in interface SignatureInformation
public boolean isVerificationDone()
VerifyResult
VerifyResult.getVerificationException()
for details.isVerificationDone
in interface VerifyResult
public PdfAsException getVerificationException()
VerifyResult
VerifyResult.isVerificationDone()
.getVerificationException
in interface VerifyResult
public SignatureCheck getCertificateCheck()
VerifyResult
getCertificateCheck
in interface VerifyResult
public SignatureCheck getValueCheckCode()
VerifyResult
getValueCheckCode
in interface VerifyResult
public SignatureCheck getManifestCheckCode()
VerifyResult
getManifestCheckCode
in interface VerifyResult
public boolean isQualifiedCertificate()
VerifyResult
isQualifiedCertificate
in interface VerifyResult
public boolean isPublicAuthority()
VerifyResult
true
if public authority is indicated.isPublicAuthority
in interface VerifyResult
true
if public authority.public java.lang.String getPublicAuthorityCode()
VerifyResult
null
.getPublicAuthorityCode
in interface VerifyResult
null
.public java.util.List getPublicProperties()
VerifyResult
Such public properties are certificate extensions each being assigned an own OID. For example the public property "Verwaltungseigenschaft" has the OID "1.2.40.0.10.1.1.1".
getPublicProperties
in interface VerifyResult
public java.util.Date getVerificationTime()
VerifyResult
Note that this is actually the Date passed to the verify methods over
VerifyParameters.setVerificationTime(Date)
or
VerifyAfterAnalysisParameters.setVerificationTime(Date)
. The
signature devices don't respond the actual verification time so there is no
guarantee that the set verification time was actually used as time of
verification. Please consult the device's documentation for more
information.
If the verification device does not return a verification time and no
verification time was set in the
VerifyParameters.setVerificationTime(Date)
or
VerifyAfterAnalysisParameters.setVerificationTime(Date)
, the time
returned by this method will be equal to the signing time (
SignatureInformation.getSigningTime()
).
getVerificationTime
in interface VerifyResult
public java.lang.String getHashInputData()
VerifyResult
This will only return a value other than null if the corresponding
VerifyParameters
has been set to true.
Note that the HashInputData does not necessarily have to be exactly the
same as the signed data return by the
SignatureInformation.getSignedData()
method.
getHashInputData
in interface VerifyResult
SignatureInformation.getSignedData()
public java.util.List getNonTextualObjects()
VerifyResult
NonTextObjectInfo
> of non textual objects in the pdf document.
Only available for textual signatures. Show this to the user who signed the textual content only!getNonTextualObjects
in interface SignatureInformation
getNonTextualObjects
in interface VerifyResult
NonTextObjectInfo
or null of not available (binary signature)public boolean hasNonTextualObjects()
VerifyResult
true
if non textual objects have been found, false
if not.hasNonTextualObjects
in interface SignatureInformation
hasNonTextualObjects
in interface VerifyResult
true
if non textual objects have been found, false
if not.public XMLDsigData getReconstructedXMLDsig()
VerifyResult