use of org.kse.gui.dialogs.extensions.DAddExtensions in project keystore-explorer by kaikramer.
the class DGenerateKeyPairCert method addExtensionsPressed.
private void addExtensionsPressed() {
PublicKey subjectPublicKey = keyPair.getPublic();
PublicKey caPublicKey = null;
X500Name caIssuerName = null;
BigInteger caSerialNumber = null;
if (issuerCert != null) {
caIssuerName = X500NameUtils.x500PrincipalToX500Name(issuerCert.getIssuerX500Principal());
caPublicKey = issuerCert.getPublicKey();
caSerialNumber = issuerCert.getSerialNumber();
} else {
// May be null
caIssuerName = jdnName.getDistinguishedName();
caPublicKey = keyPair.getPublic();
String serialNumberStr = jtfSerialNumber.getText().trim();
if (serialNumberStr.length() != 0) {
try {
caSerialNumber = new BigInteger(serialNumberStr);
} catch (NumberFormatException ex) {
// Don't set serial number
}
}
}
DAddExtensions dAddExtensions = new DAddExtensions(this, extensions, caPublicKey, caIssuerName, caSerialNumber, subjectPublicKey);
dAddExtensions.setLocationRelativeTo(this);
dAddExtensions.setVisible(true);
if (dAddExtensions.getExtensions() != null) {
extensions = dAddExtensions.getExtensions();
}
}
use of org.kse.gui.dialogs.extensions.DAddExtensions in project keystore-explorer by kaikramer.
the class DSignCsr method addExtensionsPressed.
private void addExtensionsPressed() {
DAddExtensions dAddExtensions = new DAddExtensions(this, extensions, verificationCertificate.getPublicKey(), X500NameUtils.x500PrincipalToX500Name(verificationCertificate.getSubjectX500Principal()), verificationCertificate.getSerialNumber(), csrPublicKey);
dAddExtensions.setLocationRelativeTo(this);
dAddExtensions.setVisible(true);
if (dAddExtensions.getExtensions() != null) {
// Dialog not cancelled
extensions = dAddExtensions.getExtensions();
}
}
Aggregations