public final class Tif extends Dnie
Modifier and Type | Class and Description |
---|---|
(package private) class |
Tif.TifCertificate |
SecureCard.CHANNEL_TYPE
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATR |
static java.lang.String |
ATS |
ATR_DNIE, ATR_RESID, AUTH_CERT_ALIAS, AUTH_KEY_LABEL, authCert, authCertPath, authKeyRef, INTERMEDIATE_CA_CERT_ALIAS, intermediateCaCert, serialID, SIGN_CERT_ALIAS, SIGN_KEY_LABEL, signCert, signCertPath, signKeyRef
_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 |
---|
Tif(ApduConnection conn,
CryptoHelper cryptoHelper,
SignatureNotification signatureNotification)
Construye una clase que representa un DNIe-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) |
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[] |
getSerialNumber()
Cwa14890Card interface methods
|
protected boolean |
isSecurityChannelOpen()
BaseCard parent class methods
|
void |
verifyCaIntermediateIcc() |
byte[] |
verifyIfdCertificateChain(SecureCard.CHANNEL_TYPE type) |
getRefIccPrivateKey, sign
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 ATS
public Tif(ApduConnection conn, CryptoHelper cryptoHelper, SignatureNotification signatureNotification)
conn
- Conexión con la tarjetacryptoHelper
- Funcionalidades criptográficas de utilidad que pueden variar entre máquinas virtualespublic java.lang.String[] getAliases()
getAliases
in interface CryptoCard
getAliases
in class Dnie
public java.security.cert.X509Certificate[] getCACertificates()
CryptoCard
getCACertificates
in interface CryptoCard
getCACertificates
in class Dnie
public java.security.cert.X509Certificate getCertificate(java.lang.String alias)
CryptoCard
getCertificate
in interface CryptoCard
getCertificate
in class Dnie
alias
- Alias del certificadonull
si no
existe ningún certificado con ese aliaspublic PrivateKeyReference getPrivateKey(java.lang.String alias) throws CryptoCardException
CryptoCard
getPrivateKey
in interface CryptoCard
getPrivateKey
in class Dnie
alias
- Alias del certificadonull
si no existe ninguna clave privada con ese aliasCryptoCardException
- Si ocurre algún problema al recuperar la clave privada.public byte[] getSerialNumber() throws ApduConnectionException
ApduConnectionException
public byte[] verifyIfdCertificateChain(SecureCard.CHANNEL_TYPE type) throws ApduConnectionException
ApduConnectionException
public void verifyCaIntermediateIcc() throws java.io.IOException
java.io.IOException
public byte[] getChrCCvIfd(SecureCard.CHANNEL_TYPE type)
public java.security.interfaces.RSAPrivateKey getIfdPrivateKey(SecureCard.CHANNEL_TYPE type)
protected boolean isSecurityChannelOpen()
isSecurityChannelOpen
in class Dnie
protected void getPrivateKeyObjects(PrKdf prKdf)
Dnie
getPrivateKeyObjects
in class Dnie
protected void getCertificateObjects(Cdf cdf, boolean readBinaryFromPath) throws java.lang.RuntimeException
getCertificateObjects
in class Dnie
java.lang.RuntimeException