use of com.unboundid.asn1.ASN1Exception in project keystore-explorer by kaikramer.
the class DViewCrl method asn1DumpPressed.
private void asn1DumpPressed() {
try {
DViewAsn1Dump dViewAsn1Dump = new DViewAsn1Dump(this, crl);
dViewAsn1Dump.setLocationRelativeTo(this);
dViewAsn1Dump.setVisible(true);
} catch (Asn1Exception ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
} catch (IOException ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
}
}
use of com.unboundid.asn1.ASN1Exception in project keystore-explorer by kaikramer.
the class DViewCsr method asn1DumpPressed.
private void asn1DumpPressed() {
try {
DViewAsn1Dump dViewAsn1Dump;
if (pkcs10Csr != null) {
dViewAsn1Dump = new DViewAsn1Dump(this, pkcs10Csr);
} else {
dViewAsn1Dump = new DViewAsn1Dump(this, spkacCsr);
}
dViewAsn1Dump.setLocationRelativeTo(this);
dViewAsn1Dump.setVisible(true);
} catch (Asn1Exception ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
} catch (IOException ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
}
}
use of com.unboundid.asn1.ASN1Exception in project keystore-explorer by kaikramer.
the class DViewPrivateKey method asn1DumpPressed.
private void asn1DumpPressed() {
try {
DViewAsn1Dump dViewAsn1Dump = new DViewAsn1Dump(this, privateKey);
dViewAsn1Dump.setLocationRelativeTo(this);
dViewAsn1Dump.setVisible(true);
} catch (Asn1Exception ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
} catch (IOException ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
}
}
use of com.unboundid.asn1.ASN1Exception in project keystore-explorer by kaikramer.
the class DViewExtensions method asn1DumpPressed.
private void asn1DumpPressed() {
int selectedRow = jtExtensions.getSelectedRow();
if (selectedRow == -1) {
return;
}
String oid = ((ASN1ObjectIdentifier) jtExtensions.getValueAt(selectedRow, 2)).getId();
byte[] value = extensions.getExtensionValue(oid);
boolean criticality = (Boolean) jtExtensions.getValueAt(selectedRow, 0);
X509Ext extension = new X509Ext(oid, value, criticality);
try {
DViewAsn1Dump dViewAsn1Dump = new DViewAsn1Dump(this, extension);
dViewAsn1Dump.setLocationRelativeTo(this);
dViewAsn1Dump.setVisible(true);
} catch (Asn1Exception | IOException e) {
DError.displayError(this, e);
}
}
use of com.unboundid.asn1.ASN1Exception in project jmulticard by ctt-gob-es.
the class Dnie method getCdf.
/**
* Obtiene el CDF PKCS#15 del DNIe.
* @return CDF PKCS#15 del DNIe.
* @throws ApduConnectionException Si no se puede conectar con el DNIe.
*/
public Cdf getCdf() throws ApduConnectionException {
final Cdf cdf = new Cdf();
try {
selectMasterFile();
final byte[] cdfBytes = selectFileByLocationAndRead(CDF_LOCATION);
cdf.setDerValue(cdfBytes);
} catch (final IOException | Iso7816FourCardException | Asn1Exception | TlvException e) {
throw new ApduConnectionException(// $NON-NLS-1$
"No se ha podido cargar el CDF de la tarjeta", // $NON-NLS-1$
e);
}
return cdf;
}
Aggregations