|
JMRTD 0.4.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.scuba.smartcards.CardService
org.jmrtd.PassportPersoService
public class PassportPersoService
Service for initializing blank passport reference applets.
| Field Summary | |
|---|---|
static String |
EC_CURVE_NAME
The name of the EC curve for DH key pair generation (this is the only one that our passport applet supports. |
| Fields inherited from class net.sourceforge.scuba.smartcards.CardService |
|---|
listeners, SESSION_STARTED_STATE, SESSION_STOPPED_STATE, state |
| Constructor Summary | |
|---|---|
PassportPersoService(CardService service)
|
|
| Method Summary | |
|---|---|
void |
burnPassport(ZipFile passportData)
Burns a passport |
void |
close()
Closes the session with the card. |
void |
createFile(short fid,
short length)
Sends a CREATE_FILE APDU to the card. |
void |
dumpPassport(File f)
Dumps the content of a passport as a zip file |
static KeyPair |
generateAAKeyPair()
Deprecated. Leave this responsibility to the client |
boolean |
isOpen()
|
void |
lockApplet()
Locks the passport applet so that no data may be written to it. |
void |
open()
Opens a session with the card. |
void |
putCVCertificate(org.jmrtd.cert.CardVerifiableCertificate certificate)
Sends a PUT_DATA command to the card to set the root cv certificate for Extended Access Control. |
void |
putPrivateEACKey(PrivateKey privKey)
Sends a PUT_DATA command to the card to set the private key used for Extended Access Control. |
void |
putPrivateKey(PrivateKey key)
Sends a PUT_DATA command to the card to set the private keys used for Active Authentication. |
void |
selectFile(short fid)
Selects a file on the applet. |
void |
setBAC(String documentNumber,
Date dateOfBirth,
Date dateOfExpiry)
Initiates the passport with MRZ data |
ResponseAPDU |
transmit(CommandAPDU apdu)
Sends and apdu to the card. |
void |
writeFile(short fid,
InputStream i)
Writes a DataGroup in the passport |
| Methods inherited from class net.sourceforge.scuba.smartcards.CardService |
|---|
addAPDUListener, notifyExchangedAPDU, removeAPDUListener, setListenersState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EC_CURVE_NAME
| Constructor Detail |
|---|
public PassportPersoService(CardService service)
throws CardServiceException
CardServiceException| Method Detail |
|---|
public static KeyPair generateAAKeyPair()
throws GeneralSecurityException,
NoSuchAlgorithmException
GeneralSecurityException
NoSuchAlgorithmException - when BouncyCastle provider cannot be found.
public void putPrivateKey(PrivateKey key)
throws CardServiceException
key - holding the private key data.
IOException - on error.
CardServiceException
public void putPrivateEACKey(PrivateKey privKey)
throws CardServiceException
privKey - holding the private key data.
CardServiceException - on error.
public void putCVCertificate(org.jmrtd.cert.CardVerifiableCertificate certificate)
throws CardServiceException
certificate - card verifiable certificate
CardServiceException - on error.
public void createFile(short fid,
short length)
throws CardServiceException
fid - (file identifier) of the new file.length - of the new file.
CardServiceException
public void writeFile(short fid,
InputStream i)
throws CardServiceException
fid - the fid of the file to writei - the inputstream of the file to write
CardServiceException
public void setBAC(String documentNumber,
Date dateOfBirth,
Date dateOfExpiry)
throws CardServiceException
documentNumber - the passport document numberdateOfBirth - the date of birth of the holderdateOfExpiry - the date of expiry of the passport
CardServiceException
public void lockApplet()
throws CardServiceException
CardServiceException
public void selectFile(short fid)
throws CardServiceException
fid - the file ID to select
CardServiceException
public void burnPassport(ZipFile passportData)
throws CardServiceException,
IOException
passportData -
CardServiceException
IOException
public void dumpPassport(File f)
throws IOException
IOExceptionpublic void close()
CardService
close in class CardServicepublic boolean isOpen()
isOpen in class CardService
public void open()
throws CardServiceException
CardService
open in class CardServiceCardServiceException
public ResponseAPDU transmit(CommandAPDU apdu)
throws CardServiceException
CardService
transmit in class CardServiceapdu - the command apdu to send.
CardServiceException - - if the card operation failed
|
JMRTD 0.4.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||