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);
}
}
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);
}
}
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);
}
}
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);
}
}
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();
}
Aggregations