public class RemoteCryptoCard extends java.lang.Object implements CryptoCard, MrtdCard
Constructor and Description |
---|
RemoteCryptoCard(ClientSocket clientSocket) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getAliases()
Obtiene los alias de los certificados de la tarjeta.
|
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.
|
DG1_Dnie |
getDataGroup1() |
DG11 |
getDataGroup11() |
DG13 |
getDataGroup13() |
DG2 |
getDataGroup2() |
DG7 |
getDataGroup7() |
EF_COM |
getEFCOM()
MrtdCard interface methods
|
EF_SOD |
getEFSOD() |
PrivateKeyReference |
getPrivateKey(java.lang.String alias)
Obtiene una referencia a la clave privada correspondiente al alias proporcionado.
|
byte[] |
sign(byte[] digestInfo,
PrivateKeyReference keyRef)
Realiza una firma electrónica.
|
public RemoteCryptoCard(ClientSocket clientSocket)
public java.lang.String[] getAliases()
CryptoCard
getAliases
in interface CryptoCard
public java.security.cert.X509Certificate getCertificate(java.lang.String alias) throws CryptoCardException
CryptoCard
getCertificate
in interface CryptoCard
alias
- Alias del certificadonull
si no
existe ningún certificado con ese aliasCryptoCardException
- Si ocurre algún problema al recuperar el certificado.public java.security.cert.X509Certificate[] getCACertificates() throws CryptoCardException
CryptoCard
getCACertificates
in interface CryptoCard
CryptoCardException
public PrivateKeyReference getPrivateKey(java.lang.String alias) throws CryptoCardException
CryptoCard
getPrivateKey
in interface CryptoCard
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[] 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 EF_COM getEFCOM() throws CryptoCardException
getEFCOM
in interface MrtdCard
CryptoCardException
public EF_SOD getEFSOD() throws CryptoCardException
getEFSOD
in interface MrtdCard
CryptoCardException
public DG1_Dnie getDataGroup1() throws CryptoCardException
getDataGroup1
in interface MrtdCard
CryptoCardException
public DG2 getDataGroup2() throws CryptoCardException
getDataGroup2
in interface MrtdCard
CryptoCardException
public DG7 getDataGroup7() throws CryptoCardException
getDataGroup7
in interface MrtdCard
CryptoCardException
public DG11 getDataGroup11() throws CryptoCardException
getDataGroup11
in interface MrtdCard
CryptoCardException
public DG13 getDataGroup13() throws CryptoCardException
getDataGroup13
in interface MrtdCard
CryptoCardException