Search in sources :

Example 1 with DViewExtensions

use of org.kse.gui.dialogs.extensions.DViewExtensions in project keystore-explorer by kaikramer.

the class DViewCertificate method extensionsPressed.

private void extensionsPressed() {
    X509Certificate cert = getSelectedCertificate();
    DViewExtensions dViewExtensions = new DViewExtensions(this, res.getString("DViewCertificate.Extensions.Title"), cert);
    dViewExtensions.setLocationRelativeTo(this);
    dViewExtensions.setVisible(true);
}
Also used : DViewExtensions(org.kse.gui.dialogs.extensions.DViewExtensions) X509Certificate(java.security.cert.X509Certificate)

Example 2 with DViewExtensions

use of org.kse.gui.dialogs.extensions.DViewExtensions in project keystore-explorer by kaikramer.

the class DViewCrl method crlExtensionsPressed.

private void crlExtensionsPressed() {
    DViewExtensions dViewExtensions = new DViewExtensions(this, res.getString("DViewCrl.Extensions.Title"), crl);
    dViewExtensions.setLocationRelativeTo(this);
    dViewExtensions.setVisible(true);
}
Also used : DViewExtensions(org.kse.gui.dialogs.extensions.DViewExtensions)

Example 3 with DViewExtensions

use of org.kse.gui.dialogs.extensions.DViewExtensions in project keystore-explorer by kaikramer.

the class DViewCrl method displayCrlEntryExtensions.

private void displayCrlEntryExtensions() {
    int row = jtRevokedCerts.getSelectedRow();
    if (row != -1) {
        BigInteger serialNumber = (BigInteger) jtRevokedCerts.getValueAt(row, 0);
        Set<?> revokedCertsSet = crl.getRevokedCertificates();
        X509CRLEntry x509CrlEntry = null;
        for (Iterator<?> itr = revokedCertsSet.iterator(); itr.hasNext(); ) {
            X509CRLEntry entry = (X509CRLEntry) itr.next();
            if (serialNumber.equals(entry.getSerialNumber())) {
                x509CrlEntry = entry;
                break;
            }
        }
        if (x509CrlEntry.hasExtensions()) {
            DViewExtensions dViewExtensions = new DViewExtensions(this, res.getString("DViewCrl.EntryExtensions.Title"), x509CrlEntry);
            dViewExtensions.setLocationRelativeTo(this);
            dViewExtensions.setVisible(true);
        }
    }
}
Also used : X509CRLEntry(java.security.cert.X509CRLEntry) DViewExtensions(org.kse.gui.dialogs.extensions.DViewExtensions) BigInteger(java.math.BigInteger) Point(java.awt.Point)

Example 4 with DViewExtensions

use of org.kse.gui.dialogs.extensions.DViewExtensions in project keystore-explorer by kaikramer.

the class DViewCsr method extensionsPressed.

private void extensionsPressed() {
    // extract sequence with extensions from csr
    Attribute[] attributes = pkcs10Csr.getAttributes(pkcs_9_at_extensionRequest);
    X509ExtensionSet x509ExtensionSet = new X509ExtensionSet();
    if ((attributes != null) && (attributes.length > 0)) {
        ASN1Encodable[] attributeValues = attributes[0].getAttributeValues();
        if (attributeValues.length > 0) {
            ASN1Sequence asn1Sequence = ASN1Sequence.getInstance(attributeValues[0]);
            x509ExtensionSet = new X509ExtensionSet(asn1Sequence);
        }
    }
    DViewExtensions dViewExtensions = new DViewExtensions(this, res.getString("DViewCertificate.Extensions.Title"), x509ExtensionSet);
    dViewExtensions.setLocationRelativeTo(this);
    dViewExtensions.setVisible(true);
}
Also used : X509ExtensionSet(org.kse.crypto.x509.X509ExtensionSet) ASN1Sequence(org.bouncycastle.asn1.ASN1Sequence) Attribute(org.bouncycastle.asn1.pkcs.Attribute) DViewExtensions(org.kse.gui.dialogs.extensions.DViewExtensions) ASN1Encodable(org.bouncycastle.asn1.ASN1Encodable)

Aggregations

DViewExtensions (org.kse.gui.dialogs.extensions.DViewExtensions)4 Point (java.awt.Point)1 BigInteger (java.math.BigInteger)1 X509CRLEntry (java.security.cert.X509CRLEntry)1 X509Certificate (java.security.cert.X509Certificate)1 ASN1Encodable (org.bouncycastle.asn1.ASN1Encodable)1 ASN1Sequence (org.bouncycastle.asn1.ASN1Sequence)1 Attribute (org.bouncycastle.asn1.pkcs.Attribute)1 X509ExtensionSet (org.kse.crypto.x509.X509ExtensionSet)1