public class TcFnmt extends BaseCard implements MrtdCard
Modifier and Type | Class and Description |
---|---|
(package private) class |
TcFnmt.TcFnmtCertificate |
SecureCard.CHANNEL_TYPE
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATR |
static java.lang.String |
ATR_ST |
_connection, _signatureNotification, CDF_LOCATION, CERT_ICC_FILE_ID, cryptoHelper, DODF_LOCATION, EF_ATR_2F03, ESIGN_FILE, FAST_MODE_PROPERTY, intermediateCaCerICC, logger, m_channelEstablished, MASTER_FILE_NAME, PRKDF_LOCATION, REF_RCA_ICC_PUBLIC_KEY
Constructor and Description |
---|
TcFnmt(ApduConnection conn,
CryptoHelper cryptoHelper,
SignatureNotification signatureNotification)
Construye una clase que representa un TCFNMT-MRTD.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getAliases()
CryptoCard interface methods
|
java.security.cert.X509Certificate[] |
getCACertificates()
Obtiene todos los certificados que pueden ser CA (no tienen clave privada asociada).
|
java.security.cert.X509Certificate |
getCertificate(java.lang.String alias)
Obtiene el certificado correspondiente al alias proporcionado.
|
protected void |
getCertificateObjects(Cdf cdf,
boolean readBinaryFromPath) |
byte[] |
getChrCCvIfd(SecureCard.CHANNEL_TYPE type) |
DG1_Dnie |
getDataGroup1() |
DG11 |
getDataGroup11() |
DG13 |
getDataGroup13() |
DG2 |
getDataGroup2() |
DG7 |
getDataGroup7() |
EF_COM |
getEFCOM()
MrtdCard interface methods
|
EF_SOD |
getEFSOD() |
java.security.interfaces.RSAPrivateKey |
getIfdPrivateKey(SecureCard.CHANNEL_TYPE type) |
PrivateKeyReference |
getPrivateKey(java.lang.String alias)
Obtiene una referencia a la clave privada correspondiente al alias proporcionado.
|
protected void |
getPrivateKeyObjects(PrKdf prKdf)
BaseCard parent class methods
|
byte[] |
getRefIccPrivateKey() |
byte[] |
getSerialNumber()
Cwa14890Card interface methods
|
protected boolean |
isSecurityChannelOpen() |
byte[] |
sign(byte[] digestInfo,
PrivateKeyReference keyRef)
Realiza una firma electrónica.
|
void |
verifyCaIntermediateIcc() |
byte[] |
verifyIfdCertificateChain(SecureCard.CHANNEL_TYPE type) |
deflate, establishChannel, externalAuthentication, getChallenge, getConnection, getIccCertEncoded, getInternalAuthenticateMessage, getSCardType, getSerialNumber, initialize, readBinary, readBinaryComplete, selectCompressedFileByLocationAndRead, selectFileById, selectFileByIdAndRead, selectFileByLocationAndRead, selectFileByName, selectMasterFile, setKeysToAuthentication, setPublicKeyToVerification, signOperation, verifyAge, verifyCertificate, verifyCertificate, verifyIcc, verifyPin
public static final java.lang.String ATR
public static final java.lang.String ATR_ST
public TcFnmt(ApduConnection conn, CryptoHelper cryptoHelper, SignatureNotification signatureNotification) throws InvalidCardException
conn
- Conexión con la tarjetacryptoHelper
- Funcionalidades criptográficas de utilidad que pueden variar entre máquinas virtualesInvalidCardException
- Si la tarjeta conectada no es un TCFNMTprotected void getPrivateKeyObjects(PrKdf prKdf)
getPrivateKeyObjects
in class BaseCard
protected void getCertificateObjects(Cdf cdf, boolean readBinaryFromPath)
getCertificateObjects
in class BaseCard
protected boolean isSecurityChannelOpen()
isSecurityChannelOpen
in class BaseCard
public java.lang.String[] getAliases()
getAliases
in interface CryptoCard
getAliases
in class BaseCard
public java.security.cert.X509Certificate getCertificate(java.lang.String alias)
CryptoCard
getCertificate
in interface CryptoCard
alias
- Alias del certificadonull
si no
existe ningún certificado con ese aliaspublic java.security.cert.X509Certificate[] getCACertificates()
CryptoCard
getCACertificates
in interface CryptoCard
public PrivateKeyReference getPrivateKey(java.lang.String alias)
CryptoCard
getPrivateKey
in interface CryptoCard
alias
- Alias del certificadonull
si no existe ninguna clave privada con ese aliaspublic byte[] sign(byte[] digestInfo, PrivateKeyReference keyRef) throws CryptoCardException
CryptoCard
sign
in interface CryptoCard
digestInfo
- Información para la firmakeyRef
- Referencia a la clave privada de firmaCryptoCardException
- Si ocurre algún problema durante la firma.public byte[] getSerialNumber() throws ApduConnectionException
getSerialNumber
in interface SecureCard
ApduConnectionException
public byte[] verifyIfdCertificateChain(SecureCard.CHANNEL_TYPE type) throws ApduConnectionException
verifyIfdCertificateChain
in interface SecureCard
ApduConnectionException
public void verifyCaIntermediateIcc() throws java.io.IOException
verifyCaIntermediateIcc
in interface SecureCard
java.io.IOException
public byte[] getRefIccPrivateKey()
getRefIccPrivateKey
in interface SecureCard
public byte[] getChrCCvIfd(SecureCard.CHANNEL_TYPE type)
getChrCCvIfd
in interface SecureCard
public java.security.interfaces.RSAPrivateKey getIfdPrivateKey(SecureCard.CHANNEL_TYPE type)
getIfdPrivateKey
in interface SecureCard
public EF_COM getEFCOM()
public DG1_Dnie getDataGroup1()
getDataGroup1
in interface MrtdCard
public DG2 getDataGroup2()
getDataGroup2
in interface MrtdCard
public DG7 getDataGroup7()
getDataGroup7
in interface MrtdCard
public DG11 getDataGroup11()
getDataGroup11
in interface MrtdCard
public DG13 getDataGroup13()
getDataGroup13
in interface MrtdCard