use of es.gob.jmulticard.card.dnie.CeresSc in project jmulticard by ctt-gob-es.
the class Ceres430KeyStoreImpl method engineLoad.
/**
* {@inheritDoc}
*/
@Override
public void engineLoad(final InputStream stream, final char[] password) throws IOException {
// Ponemos la conexion por defecto
final ApduConnection conn;
try {
conn = Ceres430Provider.getDefaultApduConnection() == null ? // $NON-NLS-1$
(ApduConnection) Class.forName("es.gob.jmulticard.jse.smartcardio.SmartcardIoConnection").getConstructor().newInstance() : Ceres430Provider.getDefaultApduConnection();
} catch (final Exception e) {
// $NON-NLS-1$
throw new IllegalStateException("No hay una conexion de APDU por defecto: " + e);
}
// Aqui se realiza el acceso e inicializacion del DNIe
this.cryptoCard = new CeresSc(conn, password != null ? new CachePasswordCallback(password) : null, new JseCryptoHelper(), null);
this.aliases = Arrays.asList(this.cryptoCard.getAliases());
}
Aggregations