Search in sources :

Example 16 with TlvException

use of es.gob.jmulticard.asn1.TlvException in project jmulticard by ctt-gob-es.

the class TestDerBoolean method testGetBytes.

/**
 * Test method for {@link es.gob.jmulticard.asn1.DecoderObject#getBytes()}.
 * @throws TlvException Si no se puede crear el TLV.
 * @throws Asn1Exception Si falla la creación del tipo ASN1.
 */
public static final void testGetBytes() throws Asn1Exception, TlvException {
    final DerBoolean db = new DerBoolean();
    db.setDerValue(new byte[] { (byte) 0x01, (byte) 0x01, (byte) 0x00 });
    // $NON-NLS-1$
    Assert.assertEquals("010100", HexUtils.hexify(db.getBytes(), false));
}
Also used : DerBoolean(es.gob.jmulticard.asn1.der.DerBoolean)

Aggregations

TlvException (es.gob.jmulticard.asn1.TlvException)10 Asn1Exception (es.gob.jmulticard.asn1.Asn1Exception)9 Tlv (es.gob.jmulticard.asn1.Tlv)8 ApduConnectionException (es.gob.jmulticard.apdu.connection.ApduConnectionException)4 DecoderObject (es.gob.jmulticard.asn1.DecoderObject)4 IOException (java.io.IOException)4 Cdf (es.gob.jmulticard.asn1.der.pkcs15.Cdf)3 InvalidCardException (es.gob.jmulticard.card.InvalidCardException)3 Location (es.gob.jmulticard.card.Location)3 FileNotFoundException (es.gob.jmulticard.card.iso7816four.FileNotFoundException)3 Iso7816FourCardException (es.gob.jmulticard.card.iso7816four.Iso7816FourCardException)3 CertificateException (java.security.cert.CertificateException)3 X509Certificate (java.security.cert.X509Certificate)3 CommandApdu (es.gob.jmulticard.apdu.CommandApdu)2 Odf (es.gob.jmulticard.asn1.der.pkcs15.Odf)2 Path (es.gob.jmulticard.asn1.der.pkcs15.Path)2 Pkcs15Cdf (es.gob.jmulticard.asn1.der.pkcs15.Pkcs15Cdf)2 PrKdf (es.gob.jmulticard.asn1.der.pkcs15.PrKdf)2 AuthenticationModeLockedException (es.gob.jmulticard.card.AuthenticationModeLockedException)2 BadPinException (es.gob.jmulticard.card.BadPinException)2