Search in sources :

Example 11 with Iso7816FourCardException

use of es.gob.jmulticard.card.iso7816four.Iso7816FourCardException in project jmulticard by ctt-gob-es.

the class Dnie method getIccCertEncoded.

/**
 * {@inheritDoc}
 */
@Override
public byte[] getIccCertEncoded() throws IOException {
    byte[] iccCertEncoded;
    try {
        selectMasterFile();
        iccCertEncoded = selectFileByIdAndRead(CERT_ICC_FILE_ID);
    } catch (final ApduConnectionException e) {
        throw new IOException(// $NON-NLS-1$
        "Error en el envio de APDU para la seleccion del certificado de componente de la tarjeta: " + e, // $NON-NLS-1$
        e);
    } catch (final Iso7816FourCardException e) {
        // $NON-NLS-1$
        throw new IOException("Error en la seleccion del certificado de componente de la tarjeta: " + e, e);
    }
    return iccCertEncoded;
}
Also used : Iso7816FourCardException(es.gob.jmulticard.card.iso7816four.Iso7816FourCardException) IOException(java.io.IOException) ApduConnectionException(es.gob.jmulticard.apdu.connection.ApduConnectionException)

Aggregations

Iso7816FourCardException (es.gob.jmulticard.card.iso7816four.Iso7816FourCardException)11 ApduConnectionException (es.gob.jmulticard.apdu.connection.ApduConnectionException)9 BadPinException (es.gob.jmulticard.card.BadPinException)7 IOException (java.io.IOException)7 AuthenticationModeLockedException (es.gob.jmulticard.card.AuthenticationModeLockedException)6 CertificateException (java.security.cert.CertificateException)6 ResponseApdu (es.gob.jmulticard.apdu.ResponseApdu)5 CryptoCardException (es.gob.jmulticard.card.CryptoCardException)5 FileNotFoundException (es.gob.jmulticard.card.iso7816four.FileNotFoundException)5 CommandApdu (es.gob.jmulticard.apdu.CommandApdu)4 InvalidCardException (es.gob.jmulticard.card.InvalidCardException)4 PinException (es.gob.jmulticard.card.PinException)4 Asn1Exception (es.gob.jmulticard.asn1.Asn1Exception)3 TlvException (es.gob.jmulticard.asn1.TlvException)3 Cdf (es.gob.jmulticard.asn1.der.pkcs15.Cdf)3 Location (es.gob.jmulticard.card.Location)3 ByteArrayInputStream (java.io.ByteArrayInputStream)3 CertificateFactory (java.security.cert.CertificateFactory)3 UnsupportedCallbackException (javax.security.auth.callback.UnsupportedCallbackException)3 StatusWord (es.gob.jmulticard.apdu.StatusWord)2