use of es.gob.jmulticard.JseCryptoHelper 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());
}
use of es.gob.jmulticard.JseCryptoHelper in project jmulticard by ctt-gob-es.
the class CeresKeyStoreImpl method engineLoad.
/**
* {@inheritDoc}
*/
@Override
public void engineLoad(final InputStream stream, final char[] password) throws IOException {
// Aqui se realiza el acceso e inicializacion de la tarjeta
this.cryptoCard = new Ceres(getApduConnection(), new JseCryptoHelper());
// Precargamos los alias
loadAliases();
}
use of es.gob.jmulticard.JseCryptoHelper in project jmulticard by ctt-gob-es.
the class SmartCafeKeyStoreImpl method engineLoad.
/**
* {@inheritDoc}
*/
@Override
public void engineLoad(final InputStream stream, final char[] password) throws IOException {
// Ponemos la conexion por defecto
final ApduConnection conn = new es.gob.jmulticard.jse.smartcardio.SmartcardIoConnection();
// Aqui se realiza el acceso e inicializacion de la tarjeta
this.cryptoCard = new SmartCafePkcs15Applet(conn, new JseCryptoHelper());
if (password != null) {
this.cryptoCard.setPasswordCallback(new CachePasswordCallback(password));
}
this.aliases = Arrays.asList(this.cryptoCard.getAliases());
}
Aggregations