org.jmrtd
Class Passport
java.lang.Object
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)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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()