Package org.jmrtd.protocol
Class EACTAAPDUSender
- java.lang.Object
-
- org.jmrtd.protocol.EACTAAPDUSender
-
- All Implemented Interfaces:
APDULevelEACTACapable
public class EACTAAPDUSender extends Object implements APDULevelEACTACapable
A low-level APDU sender to support the (EAC) Terminal Authentication protocol.- Since:
- 0.7.0
- Version:
- $Revision: 1799 $
- Author:
- The JMRTD team
-
-
Constructor Summary
Constructors Constructor Description EACTAAPDUSender(net.sf.scuba.smartcards.CardService service)
Creates an APDU sender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
sendGetChallenge(net.sf.scuba.smartcards.APDUWrapper wrapper)
Sends aGET CHALLENGE
command to the passport.void
sendMSESetATExtAuth(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] data)
The MSE Set AT APDU for TA, see EAC 1.11 spec, Section B.2.void
sendMSESetDST(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] data)
The MSE DST APDU, see EAC 1.11 spec, Section B.2.void
sendMutualAuthenticate(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] signature)
Sends the EXTERNAL AUTHENTICATE command.void
sendPSOExtendedLengthMode(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] certBodyData, byte[] certSignatureData)
Sends a perform security operation command in extended length mode.
-
-
-
Method Detail
-
sendMSESetDST
public void sendMSESetDST(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] data) throws net.sf.scuba.smartcards.CardServiceException
The MSE DST APDU, see EAC 1.11 spec, Section B.2. This means that a case 3 APDU is sent, to which no response is expected.- Specified by:
sendMSESetDST
in interfaceAPDULevelEACTACapable
- Parameters:
wrapper
- secure messaging wrapperdata
- public key reference data object (tag 0x83)- Throws:
net.sf.scuba.smartcards.CardServiceException
- on error
-
sendPSOExtendedLengthMode
public void sendPSOExtendedLengthMode(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] certBodyData, byte[] certSignatureData) throws net.sf.scuba.smartcards.CardServiceException
Sends a perform security operation command in extended length mode.- Specified by:
sendPSOExtendedLengthMode
in interfaceAPDULevelEACTACapable
- Parameters:
wrapper
- secure messaging wrappercertBodyData
- the certificate bodycertSignatureData
- signature data- Throws:
net.sf.scuba.smartcards.CardServiceException
- on error communicating over the service
-
sendMSESetATExtAuth
public void sendMSESetATExtAuth(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] data) throws net.sf.scuba.smartcards.CardServiceException
The MSE Set AT APDU for TA, see EAC 1.11 spec, Section B.2. MANAGE SECURITY ENVIRONMENT command with SET Authentication Template function. Note that caller is responsible for prefixing the byte[] params with specified tags.- Specified by:
sendMSESetATExtAuth
in interfaceAPDULevelEACTACapable
- Parameters:
wrapper
- secure messaging wrapperdata
- public key reference data object (should already be prefixed with tag 0x83)- Throws:
net.sf.scuba.smartcards.CardServiceException
- on error
-
sendGetChallenge
public byte[] sendGetChallenge(net.sf.scuba.smartcards.APDUWrapper wrapper) throws net.sf.scuba.smartcards.CardServiceException
Sends aGET CHALLENGE
command to the passport.- Specified by:
sendGetChallenge
in interfaceAPDULevelEACTACapable
- Parameters:
wrapper
- secure messaging wrapper- Returns:
- a byte array of length 8 containing the challenge
- Throws:
net.sf.scuba.smartcards.CardServiceException
- on tranceive error
-
sendMutualAuthenticate
public void sendMutualAuthenticate(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] signature) throws net.sf.scuba.smartcards.CardServiceException
Sends the EXTERNAL AUTHENTICATE command. This is used in EAC-TA.- Specified by:
sendMutualAuthenticate
in interfaceAPDULevelEACTACapable
- Parameters:
wrapper
- secure messaging wrappersignature
- terminal signature- Throws:
net.sf.scuba.smartcards.CardServiceException
- if the resulting status word different from 9000
-
-