/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.tridium.crypto.core.cert.NX509Certificate * com.tridium.ui.theme.Theme * com.tridium.ui.theme.custom.nss.StyleUtils * javax.baja.nre.util.ByteArrayUtil * javax.baja.sys.BValue * javax.baja.sys.Sys * javax.baja.sys.Type * javax.baja.ui.BLabel * javax.baja.ui.BWidget * javax.baja.ui.enums.BHalign * javax.baja.ui.pane.BBorderPane * javax.baja.ui.pane.BEdgePane * javax.baja.ui.pane.BGridPane * javax.baja.ui.style.IStylable * javax.baja.util.Lexicon */ package com.tridium.platcrypto.ui; import com.tridium.crypto.core.cert.NX509Certificate; import com.tridium.ui.theme.Theme; import com.tridium.ui.theme.custom.nss.StyleUtils; import java.util.Enumeration; import java.util.Properties; import javax.baja.nre.util.ByteArrayUtil; import javax.baja.sys.BValue; import javax.baja.sys.Sys; import javax.baja.sys.Type; import javax.baja.ui.BLabel; import javax.baja.ui.BWidget; import javax.baja.ui.enums.BHalign; import javax.baja.ui.pane.BBorderPane; import javax.baja.ui.pane.BEdgePane; import javax.baja.ui.pane.BGridPane; import javax.baja.ui.style.IStylable; import javax.baja.util.Lexicon; /* * Illegal identifiers - consider using --renameillegalidents true */ public class BX509CertificatePane extends BEdgePane { public static final Type TYPE; static Lexicon lex; private NX509Certificate cert; private Properties before; private Properties after; static /* synthetic */ Class class$com$tridium$platcrypto$ui$BX509CertificatePane; public Type getType() { return TYPE; } public void set(NX509Certificate nX509Certificate) { this.set(nX509Certificate, null, null); } public void set(NX509Certificate nX509Certificate, Properties properties, Properties properties2) { this.cert = nX509Certificate; this.before = properties; this.after = properties2; this.buildCertPane(); } private final void buildCertPane() { BGridPane bGridPane = new BGridPane(2); bGridPane.setStretchColumn(1); bGridPane.setColorRows(true); StyleUtils.addStyleClass((IStylable)bGridPane, (String)"scrolled"); bGridPane.setColumnAlign(BHalign.fill); this.appendProperties(bGridPane, this.before); this.appendCertProperties(bGridPane); this.appendProperties(bGridPane, this.after); this.setCenter((BWidget)bGridPane); } protected void appendProperties(BGridPane bGridPane, Properties properties) { if (properties == null) { return; } Enumeration enumeration = properties.keys(); while (enumeration.hasMoreElements()) { String string = (String)enumeration.nextElement(); String string2 = properties.getProperty(string, null); if (string2 == null) continue; bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText(string), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(string2, true)); } } protected void appendCertProperties(BGridPane bGridPane) { if (this.cert == null) { return; } bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.version"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel("v" + this.cert.getVersion(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.serialNum"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(ByteArrayUtil.toHexString((byte[])this.cert.getSerialNumber().toByteArray(), (String)" "), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.issuedBy"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getIssuer(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.issuerDn"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getIssuerDN().toString(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.subject"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getSubject(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.subjectDn"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getSubjectDN().toString(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.notBefore"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getNotBefore().toString(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.notAfter"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getNotAfter().toString(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.keyAlgorithm"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getKeyAlgorithm(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.keySize"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel("" + this.cert.getKeySize(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.signatureAlgorithm"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getSignatureAlgorithm(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.signatureSize"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel("" + this.cert.getSignatureSize(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.basicConstraints"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getBasicConstraints(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.keyUsage"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getKeyUsage(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.extendedKeyUsage"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getExtendedKeyUsage(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.md5Fingerprint"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getMD5Fingerprint(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.sha1Fingerprint"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.getSHA1Fingerprint(), true)); bGridPane.add(null, (BValue)this.createPaddedLabel(lex.getText("cert.field.valid"), false)); bGridPane.add(null, (BValue)this.createPaddedLabel(this.cert.checkValidity() ? lex.getText("cert.field.valid.true") : lex.getText("cert.field.valid.false"), true)); } private final BWidget createPaddedLabel(String string, boolean bl) { BLabel bLabel = new BLabel(string, BHalign.left); if (bl) { bLabel.setFont(Theme.label().getFixedWidthFont((IStylable)bLabel)); } BBorderPane bBorderPane = new BBorderPane((BWidget)bLabel, 0.0, (double)5, 0.0, 15.0); return bBorderPane; } static /* synthetic */ Class class(String string, boolean bl) { try { Class clazz = Class.forName(string); if (!bl) { clazz = clazz.getComponentType(); } return clazz; } catch (ClassNotFoundException classNotFoundException) { throw new NoClassDefFoundError(classNotFoundException.getMessage()); } } public BX509CertificatePane() { this.cert = null; this.before = null; this.after = null; } public BX509CertificatePane(NX509Certificate nX509Certificate) { this.cert = nX509Certificate; this.before = null; this.after = null; this.buildCertPane(); } public BX509CertificatePane(NX509Certificate nX509Certificate, Properties properties, Properties properties2) { this.cert = nX509Certificate; this.before = properties; this.after = properties2; this.buildCertPane(); } static { Class clazz = class$com$tridium$platcrypto$ui$BX509CertificatePane; if (clazz == null) { clazz = class$com$tridium$platcrypto$ui$BX509CertificatePane = BX509CertificatePane.class("[Lcom.tridium.platcrypto.ui.BX509CertificatePane;", false); } TYPE = Sys.loadType((Class)clazz); lex = Lexicon.make((String)"platCrypto"); } }