use of org.kse.crypto.CryptoException in project keystore-explorer by kaikramer.
the class DProperties method createTrustedCertificateNodes.
private void createTrustedCertificateNodes(DefaultMutableTreeNode parentNode, String alias) throws CryptoException {
try {
KeyStore keyStore = currentState.getKeyStore();
DefaultMutableTreeNode trustedCertificateNode = new DefaultMutableTreeNode(alias);
parentNode.add(trustedCertificateNode);
createLastModifiedNode(trustedCertificateNode, alias);
X509Certificate trustedCertificate = X509CertUtil.convertCertificate(keyStore.getCertificate(alias));
populateCertificateNode(trustedCertificateNode, trustedCertificate);
} catch (KeyStoreException ex) {
throw new CryptoException(res.getString("DProperties.NoGetProperties.exception.message"), ex);
}
}
use of org.kse.crypto.CryptoException in project keystore-explorer by kaikramer.
the class DViewCertificate method pemEncodingPressed.
private void pemEncodingPressed() {
X509Certificate cert = getSelectedCertificate();
try {
DViewPem dViewCertPem = new DViewPem(this, res.getString("DViewCertificate.Pem.Title"), cert);
dViewCertPem.setLocationRelativeTo(this);
dViewCertPem.setVisible(true);
} catch (CryptoException ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
}
}
use of org.kse.crypto.CryptoException in project keystore-explorer by kaikramer.
the class DViewCertificate method pubKeyDetailsPressed.
private void pubKeyDetailsPressed() {
try {
X509Certificate cert = getSelectedCertificate();
DViewPublicKey dViewPublicKey = new DViewPublicKey(this, res.getString("DViewCertificate.PubKeyDetails.Title"), cert.getPublicKey());
dViewPublicKey.setLocationRelativeTo(this);
dViewPublicKey.setVisible(true);
} catch (CryptoException ex) {
DError dError = new DError(this, ex);
dError.setLocationRelativeTo(this);
dError.setVisible(true);
}
}
use of org.kse.crypto.CryptoException 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.crypto.CryptoException 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);
}
}
Aggregations