at.gv.egiz.pdfas.impl.api.verify
Class VerifyResultAdapter

java.lang.Object
  extended byat.gv.egiz.pdfas.impl.api.commons.SignatureInformationAdapter
      extended byat.gv.egiz.pdfas.impl.api.verify.VerifyResultAdapter
All Implemented Interfaces:
SignatureInformation, VerifyResult

public class VerifyResultAdapter
extends SignatureInformationAdapter
implements VerifyResult

Implements the VerifyResult interface.

Author:
wprinz

Field Summary
protected  SignatureResponse sigRes
           
protected  Date vTime
           
 
Fields inherited from class at.gv.egiz.pdfas.impl.api.commons.SignatureInformationAdapter
nonTextualObjects, signatureHolder, timeStamp
 
Constructor Summary
VerifyResultAdapter(SignatureResponse sigRes, SignatureHolder sh, Date verificationTime)
          Constructor.
 
Method Summary
 SignatureCheck getCertificateCheck()
          Returns the result of the certificate check.
 String getHashInputData()
          Returns the hash input data as returned by MOA as Base64-encoded String.
 Object getInternalSignatureInformation()
          Returns additional, internal information about the found signature.
 SignatureCheck getManifestCheckCode()
          Returns the result of the manifest check.
 String getPublicAuthorityCode()
          Returns the public authority code or .
 List getPublicProperties()
          Returns a list of Strings each stating one public property of the certificate.
 X509Certificate getSignerCertificate()
          Returns the certificate of the signer.
 SignatureCheck getValueCheckCode()
          Returns the result of the value (and hash) check.
 Date getVerificationTime()
          Returns the verification time, which is the time when the signature was verified.
 boolean isPublicAuthority()
          Returns if public authority is indicated.
 boolean isQualifiedCertificate()
          Returns true, if the signer's certificate is a qualified certificate.
 
Methods inherited from class at.gv.egiz.pdfas.impl.api.commons.SignatureInformationAdapter
getNonTextualObjects, getSignatureType, getSignedData, getSigningTime, getTimeStampValue, hasNonTextualObjects, setNonTextualObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface at.gv.egiz.pdfas.api.verify.VerifyResult
getNonTextualObjects, hasNonTextualObjects
 
Methods inherited from interface at.gv.egiz.pdfas.api.commons.SignatureInformation
getSignatureType, getSignedData, getSigningTime, getTimeStampValue, setNonTextualObjects
 

Field Detail

sigRes

protected SignatureResponse sigRes

vTime

protected Date vTime
Constructor Detail

VerifyResultAdapter

public VerifyResultAdapter(SignatureResponse sigRes,
                           SignatureHolder sh,
                           Date verificationTime)
Constructor.

Parameters:
sigRes - The SignatureResponse.
sh - The SignatureHolder.
verificationTime - The time of verification. This is directly returned by getVerificationTime()
Method Detail

getCertificateCheck

public SignatureCheck getCertificateCheck()
Description copied from interface: VerifyResult
Returns the result of the certificate check.

Specified by:
getCertificateCheck in interface VerifyResult
Returns:
Returns the result of the certificate check.
See Also:
VerifyResult.getCertificateCheck()

getManifestCheckCode

public SignatureCheck getManifestCheckCode()
Description copied from interface: VerifyResult
Returns the result of the manifest check.

Specified by:
getManifestCheckCode in interface VerifyResult
Returns:
Returns the result of the manifest check.
See Also:
VerifyResult.getManifestCheckCode()

getValueCheckCode

public SignatureCheck getValueCheckCode()
Description copied from interface: VerifyResult
Returns the result of the value (and hash) check.

Specified by:
getValueCheckCode in interface VerifyResult
Returns:
Returns the result of the value (and hash) check.
See Also:
VerifyResult.getValueCheckCode()

getVerificationTime

public Date getVerificationTime()
Description copied from interface: VerifyResult
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 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()).

Specified by:
getVerificationTime in interface VerifyResult
Returns:
Returns the verification time, which is the time when the signature was verified.
See Also:
VerifyResult.getVerificationTime()

isQualifiedCertificate

public boolean isQualifiedCertificate()
Description copied from interface: VerifyResult
Returns true, if the signer's certificate is a qualified certificate.

Specified by:
isQualifiedCertificate in interface VerifyResult
Returns:
Returns true, if the signer's certificate is a qualified certificate.
See Also:
VerifyResult.isQualifiedCertificate()

getPublicProperties

public List getPublicProperties()
Description copied from interface: VerifyResult
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".

Specified by:
getPublicProperties in interface VerifyResult
Returns:
Returns the list of Strings representing the public properties of this certificate, if any.
See Also:
VerifyResult.getPublicProperties()

getInternalSignatureInformation

public Object getInternalSignatureInformation()
Description copied from interface: SignatureInformation
Returns additional, internal information about the found signature.

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.

Specified by:
getInternalSignatureInformation in interface SignatureInformation
Overrides:
getInternalSignatureInformation in class SignatureInformationAdapter
See Also:
SignatureInformation.getInternalSignatureInformation()

getSignerCertificate

public X509Certificate getSignerCertificate()
Description copied from interface: SignatureInformation
Returns the certificate of the signer.

Information like subject name, issuer name or serial number can be retrieved form this certificate.

Specified by:
getSignerCertificate in interface SignatureInformation
Overrides:
getSignerCertificate in class SignatureInformationAdapter
See Also:
SignatureInformation.getSignerCertificate()

getHashInputData

public String getHashInputData()
Description copied from interface: VerifyResult
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 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.

Specified by:
getHashInputData in interface VerifyResult
Returns:
Returns the base64 encoded hash input data as returned by MOA.
See Also:
VerifyResult.getHashInputData()

getPublicAuthorityCode

public String getPublicAuthorityCode()
Description copied from interface: VerifyResult
Returns the public authority code or .

Specified by:
getPublicAuthorityCode in interface VerifyResult
Returns:
The public authority code or .
See Also:
VerifyResult.getPublicAuthorityCode()

isPublicAuthority

public boolean isPublicAuthority()
Description copied from interface: VerifyResult
Returns if public authority is indicated.

Specified by:
isPublicAuthority in interface VerifyResult
Returns:
if public authority.
See Also:
VerifyResult.isPublicAuthority()


Copyright © 2006-2010. All Rights Reserved.