Search in sources :

Example 31 with DError

use of org.kse.gui.error.DError in project keystore-explorer by kaikramer.

the class DViewCsr method pemEncodingPressed.

private void pemEncodingPressed() {
    try {
        DViewPem dViewCsrPem = new DViewPem(this, res.getString("DViewCsr.Pem.Title"), pkcs10Csr);
        dViewCsrPem.setLocationRelativeTo(this);
        dViewCsrPem.setVisible(true);
    } catch (CryptoException ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
    }
}
Also used : CryptoException(org.kse.crypto.CryptoException) DError(org.kse.gui.error.DError)

Example 32 with DError

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

Example 33 with DError

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

Example 34 with DError

use of org.kse.gui.error.DError in project keystore-explorer by kaikramer.

the class DViewPublicKey method pemEncodingPressed.

private void pemEncodingPressed() {
    try {
        DViewPem dViewCsrPem = new DViewPem(this, res.getString("DViewPublicKey.Pem.Title"), publicKey);
        dViewCsrPem.setLocationRelativeTo(this);
        dViewCsrPem.setVisible(true);
    } catch (CryptoException ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
    }
}
Also used : CryptoException(org.kse.crypto.CryptoException) DError(org.kse.gui.error.DError)

Example 35 with DError

use of org.kse.gui.error.DError in project keystore-explorer by kaikramer.

the class DPolicyQualifierInfoChooser method okPressed.

private void okPressed() {
    PolicyQualifierInfo newPolicyQualifierInfo = null;
    try {
        if (jrbCps.isSelected()) {
            String cps = jtfCps.getText().trim();
            if (cps.length() == 0) {
                JOptionPane.showMessageDialog(this, res.getString("DPolicyQualifierInfoChooser.CpsValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
                return;
            }
            newPolicyQualifierInfo = new PolicyQualifierInfo(new ASN1ObjectIdentifier(PKIX_CPS_POINTER_QUALIFIER.oid()), (new DERIA5String(cps)).toASN1Primitive());
        } else {
            UserNotice userNotice = junUserNotice.getUserNotice();
            if (userNotice == null) {
                JOptionPane.showMessageDialog(this, res.getString("DPolicyQualifierInfoChooser.UserNoticeValueReq.message"), getTitle(), JOptionPane.WARNING_MESSAGE);
                return;
            }
            newPolicyQualifierInfo = new PolicyQualifierInfo(new ASN1ObjectIdentifier(PKIX_USER_NOTICE_QUALIFIER.oid()), userNotice);
        }
    } catch (Exception ex) {
        DError dError = new DError(this, ex);
        dError.setLocationRelativeTo(this);
        dError.setVisible(true);
        return;
    }
    policyQualifierInfo = newPolicyQualifierInfo;
    closeDialog();
}
Also used : DERIA5String(org.bouncycastle.asn1.DERIA5String) PolicyQualifierInfo(org.bouncycastle.asn1.x509.PolicyQualifierInfo) UserNotice(org.bouncycastle.asn1.x509.UserNotice) DERIA5String(org.bouncycastle.asn1.DERIA5String) ASN1ObjectIdentifier(org.bouncycastle.asn1.ASN1ObjectIdentifier) IOException(java.io.IOException) DError(org.kse.gui.error.DError)

Aggregations

DError (org.kse.gui.error.DError)52 IOException (java.io.IOException)38 CryptoException (org.kse.crypto.CryptoException)11 DERIA5String (org.bouncycastle.asn1.DERIA5String)9 JFrame (javax.swing.JFrame)8 ASN1ObjectIdentifier (org.bouncycastle.asn1.ASN1ObjectIdentifier)8 Asn1Exception (org.kse.utilities.asn1.Asn1Exception)7 Container (java.awt.Container)6 JDialog (javax.swing.JDialog)6 X509Certificate (java.security.cert.X509Certificate)4 ASN1EncodableVector (org.bouncycastle.asn1.ASN1EncodableVector)4 DERSequence (org.bouncycastle.asn1.DERSequence)4 GeneralNames (org.bouncycastle.asn1.x509.GeneralNames)4 PolicyInformation (org.bouncycastle.asn1.x509.PolicyInformation)4 PolicyQualifierInfo (org.bouncycastle.asn1.x509.PolicyQualifierInfo)4 JGeneralNames (org.kse.gui.crypto.generalname.JGeneralNames)4 Point (java.awt.Point)3 BigInteger (java.math.BigInteger)3 Date (java.util.Date)3 ArrayList (java.util.ArrayList)2