Search in sources :

Example 1 with DViewAsn1Dump

use of org.kse.gui.dialogs.DViewAsn1Dump 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 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);
    }
}
Also used : DViewAsn1Dump(org.kse.gui.dialogs.DViewAsn1Dump) IOException(java.io.IOException) Asn1Exception(org.kse.utilities.asn1.Asn1Exception) ASN1ObjectIdentifier(org.bouncycastle.asn1.ASN1ObjectIdentifier) X509Ext(org.kse.crypto.x509.X509Ext) DError(org.kse.gui.error.DError)

Aggregations

IOException (java.io.IOException)1 ASN1ObjectIdentifier (org.bouncycastle.asn1.ASN1ObjectIdentifier)1 X509Ext (org.kse.crypto.x509.X509Ext)1 DViewAsn1Dump (org.kse.gui.dialogs.DViewAsn1Dump)1 DError (org.kse.gui.error.DError)1 Asn1Exception (org.kse.utilities.asn1.Asn1Exception)1