use of es.gob.jmulticard.apdu.iso7816four.MseSetAuthenticationKeyApduCommand in project jmulticard by ctt-gob-es.
the class Dnie method setKeysToAuthentication.
/**
* {@inheritDoc}
*/
@Override
public void setKeysToAuthentication(final byte[] refPublicKey, final byte[] refPrivateKey) throws ApduConnectionException {
final CommandApdu apdu = new MseSetAuthenticationKeyApduCommand((byte) 0x00, refPublicKey, refPrivateKey);
final ResponseApdu res = getConnection().transmit(apdu);
if (!res.isOk()) {
throw new SecureChannelException(// $NON-NLS-1$
"Error durante el establecimiento de las claves publica y privada " + "para atenticacion (error: " + HexUtils.hexify(res.getBytes(), true) + // $NON-NLS-1$ //$NON-NLS-2$
")");
}
}
Aggregations