JMRTD 0.4.5

org.jmrtd
Class Passport

java.lang.Object
  extended by org.jmrtd.Passport

public class Passport
extends Object

A passport object is basically a collection of buffered input streams for the data groups, combined with some status information (progress).

Author:
Wojciech Mostowski (woj@cs.ru.nl), Martijn Oostdijk (martijn.oostdijk@gmail.com)

Constructor Summary
Passport(File file, List<CertStore> cscaStores)
           
Passport(int docType)
          Creates passport from scratch.
Passport(PassportService service, BACKeySpec bacKeySpec, List<KeyStore> cvcaStores)
           
Passport(PassportService service, List<CertStore> cscaStores, List<KeyStore> cvcaStores, BACStore bacStore)
           
 
Method Summary
 void addAuthenticationListener(AuthListener l)
           
 PrivateKey getAAPrivateKey()
           
 BACKeySpec getBACKeySpec()
           
 int getBytesRead()
           
 List<Certificate> getCertificateChain()
           
 List<CertStore> getCSCAStores()
           
 List<KeyStore> getCVCAStores()
           
 org.jmrtd.cert.CardVerifiableCertificate getCVCertificate()
           
 PrivateKey getDocSigningPrivateKey()
           
 PrivateKey getEACPrivateKey()
           
 byte[] getFileBytes(short fid)
           
 List<Short> getFileList()
           
 InputStream getInputStream(short fid)
          Gets an inputstream that is ready for reading.
 int getTotalLength()
           
 VerificationStatus getVerificationStatus()
           
 void putFile(short fid, byte[] bytes)
           
 void setAAPrivateKey(PrivateKey key)
           
 void setAAPublicKey(PublicKey key)
           
 void setCVCertificate(org.jmrtd.cert.CardVerifiableCertificate cert)
           
 void setDocSigningCertificate(X509Certificate newCertificate)
           
 void setDocSigningPrivateKey(PrivateKey key)
           
 void setEACPrivateKey(PrivateKey privateKey)
           
 void setEACPublicKey(PublicKey publicKey)
           
 void updateCOMSODFile(X509Certificate newCertificate)
           
 void verifySecurity()
          Verifies the passport using the security related mechanisms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Passport

public Passport(int docType)
         throws GeneralSecurityException
Creates passport from scratch.

Parameters:
docType - either MRZInfo.DOC_TYPE_ID1 or MRZInfo.DOC_TYPE_ID3
Throws:
GeneralSecurityException - if something wrong

Passport

public Passport(PassportService service,
                List<CertStore> cscaStores,
                List<KeyStore> cvcaStores,
                BACStore bacStore)
         throws CardServiceException
Throws:
CardServiceException

Passport

public Passport(PassportService service,
                BACKeySpec bacKeySpec,
                List<KeyStore> cvcaStores)
         throws IOException,
                CardServiceException
Throws:
IOException
CardServiceException

Passport

public Passport(File file,
                List<CertStore> cscaStores)
         throws IOException
Throws:
IOException
Method Detail

getInputStream

public InputStream getInputStream(short fid)
                           throws CardServiceException
Gets an inputstream that is ready for reading.

Parameters:
fid -
Returns:
an inputstream for fid
Throws:
CardServiceException

putFile

public void putFile(short fid,
                    byte[] bytes)

updateCOMSODFile

public void updateCOMSODFile(X509Certificate newCertificate)

getFileBytes

public byte[] getFileBytes(short fid)

getBACKeySpec

public BACKeySpec getBACKeySpec()

setDocSigningPrivateKey

public void setDocSigningPrivateKey(PrivateKey key)

setDocSigningCertificate

public void setDocSigningCertificate(X509Certificate newCertificate)

setCVCertificate

public void setCVCertificate(org.jmrtd.cert.CardVerifiableCertificate cert)

getCVCertificate

public org.jmrtd.cert.CardVerifiableCertificate getCVCertificate()

getDocSigningPrivateKey

public PrivateKey getDocSigningPrivateKey()

getCSCAStores

public List<CertStore> getCSCAStores()

getCVCAStores

public List<KeyStore> getCVCAStores()

setEACPrivateKey

public void setEACPrivateKey(PrivateKey privateKey)

setEACPublicKey

public void setEACPublicKey(PublicKey publicKey)

getAAPrivateKey

public PrivateKey getAAPrivateKey()

setAAPrivateKey

public void setAAPrivateKey(PrivateKey key)

setAAPublicKey

public void setAAPublicKey(PublicKey key)

getEACPrivateKey

public PrivateKey getEACPrivateKey()

getTotalLength

public int getTotalLength()

getBytesRead

public int getBytesRead()

getFileList

public List<Short> getFileList()

verifySecurity

public void verifySecurity()
Verifies the passport using the security related mechanisms. Adjusts the verificationIndicator to show the user the verification status. Assumes passport object is non-null and read from the service.


getCertificateChain

public List<Certificate> getCertificateChain()

addAuthenticationListener

public void addAuthenticationListener(AuthListener l)

getVerificationStatus

public VerificationStatus getVerificationStatus()

JMRTD 0.4.5