package at.gv.egiz.pdfas.api.verify; import java.util.Date; import java.util.List; import at.gv.egiz.pdfas.api.analyze.NonTextObjectInfo; import at.gv.egiz.pdfas.api.commons.SignatureInformation; /** * Encapsulates the data of a verification of one signature. * * @author wprinz */ public interface VerifyResult extends SignatureInformation { /** * Returns the result of the certificate check. * * @return Returns the result of the certificate check. */ public SignatureCheck getCertificateCheck(); /** * Returns the result of the value (and hash) check. * * @return Returns the result of the value (and hash) check. */ public SignatureCheck getValueCheckCode(); /** * Returns the result of the manifest check. * * @return Returns the result of the manifest check. */ public SignatureCheck getManifestCheckCode(); /** * Returns true, if the signer's certificate is a qualified certificate. * * @return Returns true, if the signer's certificate is a qualified * certificate. */ public boolean isQualifiedCertificate(); /** * Returns {@code true} if public authority is indicated. * @return {@code true} if public authority. */ public boolean isPublicAuthority(); /** * Returns the public authority code or {@code null}. * @return The public authority code or {@code null}. */ public String getPublicAuthorityCode(); /** * Returns a list of Strings each stating one public property of the * certificate. * *
* 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". *
* * @return Returns the list of Strings representing the public properties of * this certificate, if any. */ public List getPublicProperties(); /** * Returns the verification time, which is the time when the signature was * verified. * ** Note that this is actually the Date passed to the verify methods over * {@link VerifyParameters#setVerificationTime(Date)} or * {@link 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 * {@link VerifyParameters#setVerificationTime(Date)} or * {@link VerifyAfterAnalysisParameters#setVerificationTime(Date)}, the time * returned by this method will be equal to the signing time ( * {@link SignatureInformation#getSigningTime()}). *
* * @return Returns the verification time, which is the time when the signature * was verified. */ public Date getVerificationTime(); /** * Returns the hash input data as returned by MOA as Base64-encoded String. * ** This will only return a value other than null if the corresponding * {@link 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 * {@link SignatureInformation#getSignedData()} method. *
* * @return Returns the base64 encoded hash input data as returned by MOA. * * @see SignatureInformation#getSignedData() */ public String getHashInputData(); /** * Returns a list<{@link 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! * @return List<{@link NonTextObjectInfo} or null of not available (binary signature) */ public List getNonTextualObjects(); /** * Returnstrue
if non textual objects have been found, false
if not.
* @return true
if non textual objects have been found, false
if not.
*/
public boolean hasNonTextualObjects();
}