link start!

This commit is contained in:
cherubin
2026-03-17 13:31:18 -07:00
commit 08abe87cfb
5910 changed files with 386288 additions and 0 deletions
@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.daemon.BDaemonScheme$DaemonQuery
* com.tridium.platform.daemon.BDaemonSession
* javax.baja.naming.BHost
* javax.baja.naming.BOrdScheme
* javax.baja.naming.InvalidOrdBaseException
* javax.baja.naming.OrdQuery
* javax.baja.naming.OrdTarget
* javax.baja.naming.SyntaxException
* javax.baja.naming.UnresolvedException
* javax.baja.security.AuthenticationException
* javax.baja.sys.BObject
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.platcrypto.daemon;
import com.tridium.platcrypto.daemon.BDaemonSecureSession;
import com.tridium.platform.daemon.BDaemonScheme;
import com.tridium.platform.daemon.BDaemonSession;
import javax.baja.naming.BHost;
import javax.baja.naming.BOrdScheme;
import javax.baja.naming.InvalidOrdBaseException;
import javax.baja.naming.OrdQuery;
import javax.baja.naming.OrdTarget;
import javax.baja.naming.SyntaxException;
import javax.baja.naming.UnresolvedException;
import javax.baja.security.AuthenticationException;
import javax.baja.sys.BObject;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BDaemonSecureScheme
extends BOrdScheme {
public static final BDaemonSecureScheme INSTANCE = new BDaemonSecureScheme();
public static final int DEFAULT_PORT = 5011;
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BDaemonSecureScheme;
public OrdQuery parse(String string) {
return new DaemonQuery(string);
}
public OrdTarget resolve(OrdTarget ordTarget, OrdQuery ordQuery) throws SyntaxException, UnresolvedException {
if (!(ordTarget.get() instanceof BHost)) {
throw new InvalidOrdBaseException();
}
BHost bHost = (BHost)ordTarget.get();
BDaemonScheme.DaemonQuery daemonQuery = (BDaemonScheme.DaemonQuery)ordQuery;
int n = daemonQuery == null ? 5011 : daemonQuery.getPort();
String[] stringArray = daemonQuery == null ? null : daemonQuery.getTunnelAuthorities();
BDaemonSession bDaemonSession = null;
try {
bDaemonSession = BDaemonSecureSession.make(bHost, n, stringArray);
bDaemonSession.connect();
}
catch (AuthenticationException authenticationException) {
if (bDaemonSession != null) {
bDaemonSession.disconnect();
}
throw authenticationException;
}
catch (Exception exception) {
throw new UnresolvedException(ordQuery.toString(), (Throwable)exception);
}
return new OrdTarget(ordTarget, (BObject)bDaemonSession);
}
static String[] validateAuthorities(String[] stringArray) {
if (stringArray == null) {
return null;
}
int n = stringArray.length;
if (n < 1) {
return null;
}
String[] stringArray2 = new String[n];
int n2 = 0;
int n3 = 0;
while (n3 < n) {
if (stringArray[n3] != null && !stringArray[n3].equals("")) {
stringArray2[n2] = stringArray[n3];
++n2;
}
++n3;
}
String[] stringArray3 = new String[n2];
System.arraycopy(stringArray2, 0, stringArray3, 0, n2);
return stringArray3;
}
public Type getType() {
return TYPE;
}
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());
}
}
private BDaemonSecureScheme() {
super("platformssl");
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BDaemonSecureScheme;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BDaemonSecureScheme = BDaemonSecureScheme.class("[Lcom.tridium.platcrypto.daemon.BDaemonSecureScheme;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
public static class DaemonQuery
extends BDaemonScheme.DaemonQuery
implements OrdQuery {
public String getScheme() {
return "platformssl";
}
public String toString() {
return "platformssl:" + this.getBody();
}
public int getDefaultPort() {
return 5011;
}
DaemonQuery(String string) {
super(string);
}
DaemonQuery(int n) {
super(n);
}
DaemonQuery(int n, String[] stringArray) {
super(n, stringArray);
}
}
}
@@ -0,0 +1,254 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.net.HttpUtil
* com.tridium.platform.BPlatformSSLSettings
* com.tridium.platform.daemon.BDaemonSession
* com.tridium.util.BSessionInfo
* javax.baja.io.net.IClientSocketFactory
* javax.baja.naming.BHost
* javax.baja.naming.BOrd
* javax.baja.naming.OrdQuery
* javax.baja.nav.BINavNode
* javax.baja.net.HttpConnection
* javax.baja.net.HttpsConnection
* javax.baja.security.BIUserCredentials
* javax.baja.sys.BIcon
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.util.LexiconText
*/
package com.tridium.platcrypto.daemon;
import com.tridium.net.HttpUtil;
import com.tridium.platcrypto.daemon.BDaemonSecureScheme;
import com.tridium.platcrypto.util.BSslSessionInfo;
import com.tridium.platform.BPlatformSSLSettings;
import com.tridium.platform.daemon.BDaemonSession;
import com.tridium.util.BSessionInfo;
import java.net.ConnectException;
import java.net.Socket;
import java.net.SocketException;
import javax.baja.io.net.IClientSocketFactory;
import javax.baja.naming.BHost;
import javax.baja.naming.BOrd;
import javax.baja.naming.OrdQuery;
import javax.baja.nav.BINavNode;
import javax.baja.net.HttpConnection;
import javax.baja.net.HttpsConnection;
import javax.baja.security.BIUserCredentials;
import javax.baja.sys.BIcon;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.util.LexiconText;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BDaemonSecureSession
extends BDaemonSession {
public static final String PLATFORM_SSL_ORD = "platformssl";
public static final Type TYPE;
private static final BIcon secureBadgeConnected;
private static final BIcon secureBadgeDisconnected;
private IClientSocketFactory socketFactory;
private Socket lastSocket;
private Object SOCKET_FACTORY_LOCK;
private BOrd ordInHost;
private BOrd absOrd;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BDaemonSecureSession;
public Type getType() {
return TYPE;
}
protected BDaemonSession makeNewSession(BHost bHost, int n, String[] stringArray) {
return BDaemonSecureSession.make(bHost, n, stringArray);
}
public static BDaemonSession makeIgnoringCache(BHost bHost, int n, String[] stringArray) {
StringBuffer stringBuffer = new StringBuffer("noCache:");
stringBuffer.append(PLATFORM_SSL_ORD);
if (n != 5011) {
stringBuffer.append(":").append(n);
}
if (stringArray != null) {
int n2 = 0;
while (n2 < stringArray.length) {
if (stringArray[n2] != null) {
stringBuffer.append("/").append(stringArray[n2]);
}
++n2;
}
}
return new BDaemonSecureSession(stringBuffer.toString(), bHost, n, stringArray, BOrd.make((String)""));
}
public static BDaemonSession make(BHost bHost, int n, String[] stringArray) {
BDaemonSession bDaemonSession;
StringBuffer stringBuffer = new StringBuffer(PLATFORM_SSL_ORD);
if (n != 5011) {
stringBuffer.append(":").append(n);
}
if (stringArray != null) {
int n2 = 0;
while (n2 < stringArray.length) {
if (stringArray[n2] != null) {
stringBuffer.append("/").append(stringArray[n2]);
}
++n2;
}
}
if ((bDaemonSession = (BDaemonSession)bHost.getNavChild(stringBuffer.toString())) == null || !(bDaemonSession instanceof BDaemonSecureSession)) {
BOrd bOrd;
if (stringArray != null) {
int n3 = 0;
while (n3 < stringArray.length) {
HttpUtil.parseHost((String)stringArray[n3]);
HttpUtil.parsePort((String)stringArray[n3], (int)3011);
++n3;
}
bOrd = BOrd.make((OrdQuery)new BDaemonSecureScheme.DaemonQuery(n, stringArray));
} else {
bOrd = BOrd.make((OrdQuery)new BDaemonSecureScheme.DaemonQuery(n));
}
bDaemonSession = new BDaemonSecureSession(stringBuffer.toString(), bHost, n, stringArray, bOrd);
bHost.addNavChild((BINavNode)bDaemonSession);
}
return bDaemonSession;
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
protected HttpConnection createNewConnection(String string, long l, int n, int n2, String string2) throws SocketException {
try {
Object object = this.SOCKET_FACTORY_LOCK;
synchronized (object) {
if (this.socketFactory == null) {
this.socketFactory = HttpsConnection.getDefaultSocketFactory();
}
HttpsConnection httpsConnection = new HttpsConnection(this.getHost(), this.getPort(), string2, this.socketFactory);
return this.initConnection((HttpConnection)httpsConnection, string, l, n, n2);
}
}
catch (Exception exception) {
return null;
}
}
protected void setDefaultAgent() {
this.getAgentList().remove("platform:DaemonTunnelSessionAgent");
this.getAgentList().remove("platform:DaemonSessionAgent");
if (this.tunnelAuthorities != null) {
this.getAgentList().toTop("platformssl:DaemonSecureTunnelSessionAgent");
} else {
this.getAgentList().toTop("platformssl:DaemonSecureSessionAgent");
}
}
protected int connect(HttpConnection httpConnection) throws ConnectException {
int n = super.connect(httpConnection);
this.lastSocket = httpConnection.getSocket();
return n;
}
public BSessionInfo getSessionInfo() {
BHost bHost = this.getHost();
if (bHost != null) {
String string = null;
if (this.getCredentials() instanceof BIUserCredentials) {
string = ((BIUserCredentials)this.getCredentials()).getUsername();
}
return BSslSessionInfo.make(bHost.getHostname(), this.getLastConnectedAbsTime(), this.lastSocket, string);
}
return null;
}
public boolean shouldDowngrade(BPlatformSSLSettings bPlatformSSLSettings) {
return bPlatformSSLSettings.getSslEnabled() ^ true;
}
public boolean isSecure() {
return true;
}
protected String getLexiconPrefix() {
return "DaemonSecureSession.";
}
protected int getDefaultPort() {
return 5011;
}
public BIcon getIcon() {
return BIcon.make((BIcon)super.getIcon(), (BIcon)(this.isConnected() ? secureBadgeConnected : secureBadgeDisconnected));
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
public synchronized void disconnect(boolean bl) {
super.disconnect(bl);
Object object = this.SOCKET_FACTORY_LOCK;
synchronized (object) {
this.socketFactory = null;
return;
}
}
public BOrd getNavOrd() {
return this.getAbsoluteOrd();
}
public BOrd getOrdInHost() {
return this.ordInHost;
}
public BOrd getAbsoluteOrd() {
return this.absOrd;
}
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());
}
}
private final /* synthetic */ void this() {
this.lastSocket = null;
this.SOCKET_FACTORY_LOCK = new Object();
}
protected BDaemonSecureSession(String string, BHost bHost, int n, String[] stringArray, BOrd bOrd) {
super(string, bHost, n, stringArray, bOrd, stringArray == null ? LexiconText.make((String)"platCrypto", (String)"daemon.secure.session") : LexiconText.make((String)"platCrypto", (String)"daemon.secure.tunnel.session"));
this.this();
this.ordInHost = bOrd;
this.absOrd = BOrd.make((BOrd)bHost.getAbsoluteOrd(), (BOrd)this.ordInHost);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BDaemonSecureSession;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BDaemonSecureSession = BDaemonSecureSession.class("[Lcom.tridium.platcrypto.daemon.BDaemonSecureSession;", false);
}
TYPE = Sys.loadType((Class)clazz);
secureBadgeConnected = BIcon.std((String)"badges/lock.png");
secureBadgeDisconnected = BIcon.std((String)"badges/lockDisconnected.png");
}
}
@@ -0,0 +1,100 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.daemon.BDaemonSession
* com.tridium.platform.daemon.message.DaemonMessage
* javax.baja.security.AuthenticationException
* javax.baja.sys.BComponent
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.xml.XElem
* javax.baja.xml.XParser
*/
package com.tridium.platcrypto.daemon;
import com.tridium.platcrypto.daemon.messages.CryptoServletMessage;
import com.tridium.platform.daemon.BDaemonSession;
import com.tridium.platform.daemon.message.DaemonMessage;
import java.io.InputStream;
import java.net.ConnectException;
import javax.baja.security.AuthenticationException;
import javax.baja.sys.BComponent;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
import javax.baja.xml.XParser;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public abstract class BPlatCryptoBase
extends BComponent {
public static final Type TYPE;
private BDaemonSession session;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatCryptoBase;
public Type getType() {
return TYPE;
}
public XElem send(CryptoServletMessage cryptoServletMessage) throws ConnectException, AuthenticationException {
try {
if (cryptoServletMessage.getMethod().equals("POST")) {
return this.getDaemonSession().post((DaemonMessage)cryptoServletMessage);
}
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)cryptoServletMessage);
XParser xParser = XParser.make((InputStream)inputStream);
if (xParser != null) {
return xParser.parse();
}
}
catch (Exception exception) {}
return null;
}
public XElem[] send(CryptoServletMessage cryptoServletMessage, String string) throws Exception {
XElem xElem;
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)cryptoServletMessage);
XParser xParser = XParser.make((InputStream)inputStream);
if (xParser != null && (xElem = xParser.parse()) != null) {
XElem[] xElemArray = xElem.elems(string);
return xElemArray;
}
return new XElem[0];
}
public BDaemonSession getDaemonSession() {
return this.session;
}
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 BPlatCryptoBase() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public BPlatCryptoBase(BDaemonSession bDaemonSession) {
this.session = bDaemonSession;
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BPlatCryptoBase;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BPlatCryptoBase = BPlatCryptoBase.class("[Lcom.tridium.platcrypto.daemon.BPlatCryptoBase;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,91 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.crypto.core.io.ICoreCryptoManager
* com.tridium.crypto.core.io.ICoreExemptionStore
* com.tridium.crypto.core.io.ICoreKeyStore
* com.tridium.crypto.core.io.ICoreProviderInfo
* com.tridium.platform.daemon.BDaemonSession
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.platcrypto.daemon;
import com.tridium.crypto.core.io.ICoreCryptoManager;
import com.tridium.crypto.core.io.ICoreExemptionStore;
import com.tridium.crypto.core.io.ICoreKeyStore;
import com.tridium.crypto.core.io.ICoreProviderInfo;
import com.tridium.platcrypto.daemon.BPlatCryptoBase;
import com.tridium.platcrypto.daemon.BPlatExemptionStore;
import com.tridium.platcrypto.daemon.BPlatKeyStore;
import com.tridium.platcrypto.daemon.BPlatProviderInfo;
import com.tridium.platcrypto.daemon.BPlatTrustStore;
import com.tridium.platform.daemon.BDaemonSession;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BPlatCryptoManager
extends BPlatCryptoBase
implements ICoreCryptoManager {
public static final Type TYPE;
public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatCryptoManager;
public Type getType() {
return TYPE;
}
public ICoreExemptionStore getExemptionStore() throws Exception {
return new BPlatExemptionStore(this.getDaemonSession());
}
public ICoreKeyStore getKeyStore() throws Exception {
return new BPlatKeyStore(this.getDaemonSession());
}
public ICoreProviderInfo getProviderInfo() throws Exception {
return new BPlatProviderInfo(this.getDaemonSession());
}
public ICoreKeyStore getTrustStore() throws Exception {
return new BPlatTrustStore(this.getDaemonSession());
}
public boolean isSecure() {
return this.getDaemonSession().isSecure();
}
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 BPlatCryptoManager() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public BPlatCryptoManager(BDaemonSession bDaemonSession) {
super(bDaemonSession);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BPlatCryptoManager;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BPlatCryptoManager = BPlatCryptoManager.class("[Lcom.tridium.platcrypto.daemon.BPlatCryptoManager;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,216 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.crypto.core.cert.NHostExemption
* com.tridium.crypto.core.io.ICoreExemptionStore
* com.tridium.platform.daemon.BDaemonSession
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.xml.XElem
*/
package com.tridium.platcrypto.daemon;
import com.tridium.crypto.core.cert.NHostExemption;
import com.tridium.crypto.core.io.ICoreExemptionStore;
import com.tridium.platcrypto.daemon.BPlatCryptoBase;
import com.tridium.platcrypto.daemon.messages.CryptoServletMessage;
import com.tridium.platform.daemon.BDaemonSession;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BPlatExemptionStore
extends BPlatCryptoBase
implements ICoreExemptionStore {
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatExemptionStore;
public Type getType() {
return TYPE;
}
public Enumeration exemptions() throws Exception {
XElem[] xElemArray = this.send(new GetExemptionsMessage(), "exemption");
ArrayList<NHostExemption> arrayList = new ArrayList<NHostExemption>();
if (xElemArray != null) {
int n = 0;
while (n < xElemArray.length) {
arrayList.add(NHostExemption.decodeFromString((String)xElemArray[n].text().string()));
++n;
}
return Collections.enumeration(arrayList);
}
return null;
}
public NHostExemption getExemption(String string) throws Exception {
XElem[] xElemArray = this.send(new GetExemptionMessage(string), "exemption");
if (xElemArray != null && xElemArray.length > 0) {
return NHostExemption.decodeFromString((String)xElemArray[0].text().string());
}
return null;
}
public void setExemption(NHostExemption nHostExemption) throws Exception {
this.send(new SetExemptionMessage(nHostExemption));
}
public void deleteExemption(String string) throws Exception {
this.send(new DeleteExemptionMessage(string));
}
public long getLastModified() throws Exception {
return 0L;
}
public void load() throws Exception {
}
public void save() throws IOException, Exception {
this.send(new SaveExemptionMessage());
}
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 BPlatExemptionStore() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public BPlatExemptionStore(BDaemonSession bDaemonSession) {
super(bDaemonSession);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BPlatExemptionStore;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BPlatExemptionStore = BPlatExemptionStore.class("[Lcom.tridium.platcrypto.daemon.BPlatExemptionStore;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private class GetExemptionsMessage
extends CryptoServletMessage {
public String getAction() {
return "getExemptions";
}
private GetExemptionsMessage() {
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private class GetExemptionMessage
extends CryptoServletMessage {
public String getAction() {
return "getExemption";
}
public GetExemptionMessage(String string) {
this.add("host", string);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private class SetExemptionMessage
extends CryptoServletMessage {
private NHostExemption exemption;
public String getMethod() {
return "POST";
}
public String getAction() {
return "setExemption";
}
/*
* Exception decompiling
*/
public void write(OutputStream var1_1) {
/*
* This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
*
* org.benf.cfr.reader.util.ConfusedCFRException: Back jump on a try block [egrp 2[TRYBLOCK] [2 : 69->73)] java.lang.Throwable
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op02WithProcessedDataAndRefs.insertExceptionBlocks(Op02WithProcessedDataAndRefs.java:2283)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:415)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
* at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
* at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
* at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
* at org.benf.cfr.reader.entities.ClassFile.analyseInnerClassesPass1(ClassFile.java:923)
* at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1035)
* at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
* at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
* at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
* at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
* at org.benf.cfr.reader.Main.main(Main.java:54)
*/
throw new IllegalStateException("Decompilation failed");
}
public SetExemptionMessage(NHostExemption nHostExemption) {
this.exemption = nHostExemption;
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private class DeleteExemptionMessage
extends CryptoServletMessage {
public String getAction() {
return "deleteExemption";
}
public DeleteExemptionMessage(String string) {
try {
this.add("host", string);
}
catch (Exception exception) {
throw new IllegalArgumentException("Invalid host", exception);
}
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private class SaveExemptionMessage
extends CryptoServletMessage {
public String getAction() {
return "saveExemptions";
}
private SaveExemptionMessage() {
}
}
}
@@ -0,0 +1,457 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.crypto.core.cert.NKey
* com.tridium.crypto.core.cert.NPKCS10CertificationRequest
* com.tridium.crypto.core.cert.NX509Certificate
* com.tridium.crypto.core.cert.NX509CertificateEntry
* com.tridium.crypto.core.io.ICoreKeyStore
* com.tridium.platform.daemon.BDaemonSession
* com.tridium.platform.daemon.BStationSurrogate
* com.tridium.platform.daemon.message.DaemonMessage
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.xml.XElem
* javax.baja.xml.XParser
* javax.baja.xml.XText
*/
package com.tridium.platcrypto.daemon;
import com.tridium.crypto.core.cert.NKey;
import com.tridium.crypto.core.cert.NPKCS10CertificationRequest;
import com.tridium.crypto.core.cert.NX509Certificate;
import com.tridium.crypto.core.cert.NX509CertificateEntry;
import com.tridium.crypto.core.io.ICoreKeyStore;
import com.tridium.platcrypto.daemon.BPlatCryptoBase;
import com.tridium.platcrypto.daemon.messages.CertGenerationStatusMessage;
import com.tridium.platcrypto.daemon.messages.FindCertificateMessage;
import com.tridium.platcrypto.daemon.messages.GenerateCertificateMessage;
import com.tridium.platcrypto.daemon.messages.GetKeyMessage;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
import com.tridium.platcrypto.daemon.messages.SetCertificateEntryMessage;
import com.tridium.platcrypto.daemon.messages.SetKeyEntryMessage;
import com.tridium.platcrypto.daemon.messages.SetKeyEntryWithResponseMessage;
import com.tridium.platform.daemon.BDaemonSession;
import com.tridium.platform.daemon.BStationSurrogate;
import com.tridium.platform.daemon.message.DaemonMessage;
import java.io.InputStream;
import java.security.Key;
import java.security.KeyStore;
import java.security.cert.X509Certificate;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.Enumeration;
import java.util.List;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
import javax.baja.xml.XParser;
import javax.baja.xml.XText;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BPlatKeyStore
extends BPlatCryptoBase
implements ICoreKeyStore {
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatKeyStore;
public Type getType() {
return TYPE;
}
public String getKeyStoreType() {
return "keystore";
}
private final List getAliases() throws Exception {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new KeyStoreMessage(this.getKeyStoreType()));
XElem xElem = XParser.make((InputStream)inputStream).parse();
XElem[] xElemArray = xElem.elems("key");
int n = 0;
if (xElemArray != null) {
n = xElemArray.length;
}
ArrayList<String> arrayList = new ArrayList<String>(n);
if (xElemArray != null) {
int n2 = 0;
while (n2 < xElemArray.length) {
String string = xElemArray[n2].get("alias");
if (string != null && string.length() > 0) {
arrayList.add(string);
}
++n2;
}
}
return arrayList;
}
public Enumeration aliases() throws Exception {
return Collections.enumeration(this.getAliases());
}
public boolean containsAlias(String string) throws Exception {
return this.getAliases().contains(string);
}
public void deleteEntries(String[] stringArray) throws Exception {
int n = 0;
while (n < stringArray.length) {
this.deleteEntry(stringArray[n]);
++n;
}
}
public void deleteEntry(String string) throws Exception {
this.getDaemonSession().sendMessage((DaemonMessage)new DeleteEntryMessage(this.getKeyStoreType(), string));
}
public X509Certificate[] getCertificateChain(String string) throws Exception {
XElem[] xElemArray = this.send(new GetCertificateChainMessage(this.getKeyStoreType(), string), "certificate");
if (xElemArray == null || xElemArray.length == 0) {
return null;
}
X509Certificate[] x509CertificateArray = new X509Certificate[xElemArray.length];
int n = 0;
while (n < x509CertificateArray.length) {
if (xElemArray[n] != null && xElemArray[n].text() != null && xElemArray[n].text().length() > 0) {
x509CertificateArray[n] = NX509Certificate.decodeFromString((String)xElemArray[n].text().string());
}
++n;
}
return x509CertificateArray;
}
public Key getKey(String string, char[] cArray) throws Exception {
String string2;
XText xText;
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new GetKeyMessage(this.getKeyStoreType(), string, cArray));
XElem xElem = XParser.make((InputStream)inputStream).parse();
if (xElem != null && (xText = xElem.text()) != null && (string2 = xText.toString()) != null && string2.length() > 0) {
return NKey.decodeFromString((String)string2);
}
return null;
}
public Date getCreationDate(String string) throws Exception {
String string2;
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new KeyStoreMessage(this.getKeyStoreType(), string));
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("key");
if (xElemArray.length > 0 && (string2 = xElemArray[0].get("creationDate")) != null && string2.length() == "yyyy-MM-dd HH:mm:ss".length()) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = simpleDateFormat.parse(string2);
return date;
}
return null;
}
public boolean isKeyEntry(String string) throws Exception {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new KeyStoreMessage(this.getKeyStoreType(), string));
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("key");
if (xElemArray.length > 0) {
return xElemArray[0].getb("keyEntry");
}
return false;
}
public boolean isCertificateEntry(String string) throws Exception {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new KeyStoreMessage(this.getKeyStoreType(), string));
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("key");
if (xElemArray.length > 0) {
return xElemArray[0].getb("certEntry");
}
return false;
}
public void setCertificateEntry(String string, X509Certificate x509Certificate) throws Exception {
this.send(new SetCertificateEntryMessage(this.getKeyStoreType(), string, x509Certificate));
}
public void setKeyEntry(String string, byte[] byArray, X509Certificate[] x509CertificateArray) throws Exception {
XElem xElem = this.send(new SetKeyEntryWithResponseMessage(this.getKeyStoreType(), string, byArray, x509CertificateArray));
if (xElem.text() != null) {
if (!xElem.text().string().equalsIgnoreCase("success")) {
throw new Exception(xElem.text().string());
}
} else {
this.send(new SetKeyEntryMessage(this.getKeyStoreType(), string, byArray, x509CertificateArray));
}
}
public void setKeyEntry(String string, Key key, char[] cArray, X509Certificate[] x509CertificateArray) throws Exception {
XElem xElem = this.send(new SetKeyEntryWithResponseMessage(this.getKeyStoreType(), string, key, cArray, x509CertificateArray));
if (xElem.text() != null) {
if (!xElem.text().string().equalsIgnoreCase("success")) {
throw new Exception(xElem.text().string());
}
} else {
this.send(new SetKeyEntryMessage(this.getKeyStoreType(), string, key, cArray, x509CertificateArray));
}
}
public Enumeration getCertificates() throws Exception {
XElem[] xElemArray = this.send(new GetCertificatesMessage(this.getKeyStoreType()), "certificateEntry");
int n = 0;
if (xElemArray != null) {
n = xElemArray.length;
}
ArrayList<NX509CertificateEntry> arrayList = new ArrayList<NX509CertificateEntry>(n);
if (xElemArray != null) {
int n2 = 0;
while (n2 < xElemArray.length) {
String string = xElemArray[n2].text().toString();
if (string != null && string.length() > 0) {
arrayList.add(NX509CertificateEntry.decodeFromString((String)string));
}
++n2;
}
}
return Collections.enumeration(arrayList);
}
public String findCertificate(X509Certificate x509Certificate) throws Exception {
Enumeration enumeration = this.getCertificates();
while (enumeration.hasMoreElements()) {
NX509CertificateEntry nX509CertificateEntry = (NX509CertificateEntry)enumeration.nextElement();
NX509Certificate nX509Certificate = nX509CertificateEntry.getCertificate(0);
if (nX509Certificate == null || !nX509Certificate.getPublicKey().equals(x509Certificate.getPublicKey())) continue;
return nX509CertificateEntry.getAlias();
}
return null;
}
public int generateSelfSignedCert(String string, String string2, String string3, String string4, String string5, String string6, String string7, Date date, Date date2, int n, int n2, String string8, String string9) throws Exception {
XElem xElem = this.send(new GenerateCertificateMessage(this.getKeyStoreType(), string, string2, string3, string4, string5, string6, string7, date, date2, n, n2, string8, string9));
if (xElem != null) {
return xElem.geti("requestId", -1);
}
return -1;
}
public int generateSelfSignedCert(String string, String string2, Date date, Date date2, int n, int n2, String string3, String string4) throws Exception {
XElem xElem = this.send(new GenerateCertificateMessage(this.getKeyStoreType(), string, string2, date, date2, n, n2, string3, string4));
if (xElem != null) {
return xElem.geti("requestId", -1);
}
return -1;
}
public int getCertGenerationStatus(int n) throws Exception {
XElem xElem = this.send(new CertGenerationStatusMessage(this.getKeyStoreType(), n));
if (xElem != null) {
return xElem.geti("status", -1);
}
return -1;
}
public NPKCS10CertificationRequest generateCSR(String string, String string2) throws Exception {
XElem xElem = this.send(new GenerateCsrMessage(this.getKeyStoreType(), string, string2));
if (xElem != null && xElem.text() != null) {
String string3 = xElem.text().toString();
return NPKCS10CertificationRequest.make((String)string3);
}
return null;
}
public X509Certificate getCertificate(String string) throws Exception {
XElem xElem = this.send(new GetCertificateMessage(this.getKeyStoreType(), string));
if (xElem != null && xElem.text() != null) {
String string2 = xElem.text().toString();
return NX509Certificate.decodeFromString((String)string2);
}
return null;
}
public String getCertificateAlias(X509Certificate x509Certificate) throws Exception {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new GetCertificateAliasMessage(this.getKeyStoreType(), x509Certificate));
XElem xElem = XParser.make((InputStream)inputStream).parse();
String string = xElem.get("alias");
return string;
}
public int size() throws Exception {
return this.getAliases().size();
}
public long getLastModified() throws Exception {
return 0L;
}
public void load() throws Exception {
}
public void save() throws Exception {
this.send(new SaveMessage(this.getKeyStoreType()));
}
public KeyStore getKeyStore() throws Exception {
throw new UnsupportedOperationException("can't access raw keystore remotely");
}
public boolean canGenerateCertificate() {
boolean bl = false;
try {
BDaemonSession bDaemonSession = this.getDaemonSession();
if (bDaemonSession.getHostProperties().supportsServlet("crypto")) {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new SendAliasesMessage(this.getKeyStoreType()));
XElem xElem = XParser.make((InputStream)inputStream).parse();
bl = xElem.attrIndex("canGenerate") != -1 ? xElem.getb("canGenerate", false) : (bDaemonSession.getHostProperties().getOsName().startsWith("qnx") ? BStationSurrogate.isAnyStationRunning((BDaemonSession)bDaemonSession) ^ true : true);
}
}
catch (Exception exception) {}
return bl;
}
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 BPlatKeyStore() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public BPlatKeyStore(BDaemonSession bDaemonSession) {
super(bDaemonSession);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BPlatKeyStore;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BPlatKeyStore = BPlatKeyStore.class("[Lcom.tridium.platcrypto.daemon.BPlatKeyStore;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class DeleteEntryMessage
extends KeyStoreMessage {
public String getAction() {
return "deleteEntry";
}
public DeleteEntryMessage(String string, String string2) {
super(string);
this.add("alias", string2);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class GetCertificateChainMessage
extends KeyStoreMessage {
public String getAction() {
return "getCertificateChain";
}
public GetCertificateChainMessage(String string, String string2) {
super(string);
this.add("alias", string2);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class GetCertificatesMessage
extends KeyStoreMessage {
public String getAction() {
return "getCertificates";
}
public GetCertificatesMessage(String string) {
super(string);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class GenerateCsrMessage
extends KeyStoreMessage {
public String getAction() {
return "generateCsr";
}
public GenerateCsrMessage(String string, String string2, String string3) {
super(string);
this.add("alias", string2);
if (string3 != null) {
this.add("passwd", string3);
}
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class GetCertificateMessage
extends KeyStoreMessage {
public String getAction() {
return "getCertificate";
}
public GetCertificateMessage(String string, String string2) {
super(string);
this.add("alias", string2);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class GetCertificateAliasMessage
extends FindCertificateMessage {
public String getAction() {
return "getCertificateAlias";
}
public GetCertificateAliasMessage(String string, X509Certificate x509Certificate) {
super(string, x509Certificate);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SaveMessage
extends KeyStoreMessage {
public String getAction() {
return "saveKeyStore";
}
public SaveMessage(String string) {
super(string);
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SendAliasesMessage
extends KeyStoreMessage {
public String getAction() {
return "sendAliases";
}
public SendAliasesMessage(String string) {
super(string);
}
}
}
@@ -0,0 +1,94 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.crypto.core.io.ICoreProviderInfo
* com.tridium.crypto.core.provider.IProvider
* com.tridium.crypto.core.provider.NProvider
* com.tridium.platform.daemon.BDaemonSession
* com.tridium.platform.daemon.message.DaemonMessage
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.xml.XElem
* javax.baja.xml.XParser
*/
package com.tridium.platcrypto.daemon;
import com.tridium.crypto.core.io.ICoreProviderInfo;
import com.tridium.crypto.core.provider.IProvider;
import com.tridium.crypto.core.provider.NProvider;
import com.tridium.platcrypto.daemon.BPlatCryptoBase;
import com.tridium.platcrypto.daemon.messages.GetProviderMessage;
import com.tridium.platform.daemon.BDaemonSession;
import com.tridium.platform.daemon.message.DaemonMessage;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
import javax.baja.xml.XParser;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BPlatProviderInfo
extends BPlatCryptoBase
implements ICoreProviderInfo {
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatProviderInfo;
public Type getType() {
return TYPE;
}
public IProvider getProvider(String string) throws Exception {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new GetProviderMessage(string));
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("provider");
if (xElemArray != null && xElemArray.length > 0) {
return NProvider.decodeFromString((String)xElemArray[0].text().string());
}
return null;
}
public Enumeration providers() throws Exception {
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new GetProviderMessage());
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("provider");
ArrayList<NProvider> arrayList = new ArrayList<NProvider>();
if (xElemArray != null && xElemArray.length > 0) {
arrayList.add(NProvider.decodeFromString((String)xElemArray[0].text().string()));
}
return Collections.enumeration(arrayList);
}
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 BPlatProviderInfo() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public BPlatProviderInfo(BDaemonSession bDaemonSession) {
super(bDaemonSession);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BPlatProviderInfo;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BPlatProviderInfo = BPlatProviderInfo.class("[Lcom.tridium.platcrypto.daemon.BPlatProviderInfo;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,61 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.daemon.BDaemonSession
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.platcrypto.daemon;
import com.tridium.platcrypto.daemon.BPlatKeyStore;
import com.tridium.platform.daemon.BDaemonSession;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BPlatTrustStore
extends BPlatKeyStore {
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatTrustStore;
public Type getType() {
return TYPE;
}
public String getKeyStoreType() {
return "truststore";
}
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 BPlatTrustStore() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public BPlatTrustStore(BDaemonSession bDaemonSession) {
super(bDaemonSession);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$BPlatTrustStore;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$BPlatTrustStore = BPlatTrustStore.class("[Lcom.tridium.platcrypto.daemon.BPlatTrustStore;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,19 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
public class CertGenerationStatusMessage
extends KeyStoreMessage {
public String getAction() {
return "genCertStatus";
}
public CertGenerationStatusMessage(String string, int n) {
super(string);
this.add("requestId", "" + n);
}
}
@@ -0,0 +1,47 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.daemon.message.DaemonMessage
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platform.daemon.message.DaemonMessage;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
public class CryptoServletMessage
extends DaemonMessage {
private static final String ENC = "UTF-8";
private StringBuilder message = new StringBuilder("crypto");
public String getAction() {
return "sendAliases";
}
public String getMessageString() {
return this.message.toString();
}
protected void add(String string, String string2) {
this.message.append("&").append(CryptoServletMessage.encode(string)).append("=").append(CryptoServletMessage.encode(string2));
}
private static final String encode(String string) {
String string2 = "";
if (string != null) {
try {
string2 = URLEncoder.encode(string, ENC);
}
catch (UnsupportedEncodingException unsupportedEncodingException) {
string2 = URLEncoder.encode(string);
}
}
return string2;
}
public CryptoServletMessage() {
this.message.append("?action=").append(this.getAction());
}
}
@@ -0,0 +1,59 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
import java.io.OutputStream;
import java.security.cert.X509Certificate;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class FindCertificateMessage
extends KeyStoreMessage {
private X509Certificate cert;
public String getMethod() {
return "POST";
}
public String getAction() {
return "findCertificate";
}
/*
* Exception decompiling
*/
public void write(OutputStream var1_1) {
/*
* This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
*
* org.benf.cfr.reader.util.ConfusedCFRException: Back jump on a try block [egrp 2[TRYBLOCK] [2 : 62->66)] java.lang.Throwable
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op02WithProcessedDataAndRefs.insertExceptionBlocks(Op02WithProcessedDataAndRefs.java:2283)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:415)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
* at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
* at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
* at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
* at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
* at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
* at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
* at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
* at org.benf.cfr.reader.Main.main(Main.java:54)
*/
throw new IllegalStateException("Decompilation failed");
}
private final /* synthetic */ void this() {
this.cert = null;
}
public FindCertificateMessage(String string, X509Certificate x509Certificate) {
super(string);
this.this();
this.cert = x509Certificate;
}
}
@@ -0,0 +1,53 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
import java.text.SimpleDateFormat;
import java.util.Date;
public class GenerateCertificateMessage
extends KeyStoreMessage {
private final void setCommon(Date date, Date date2, int n, int n2, String string, String string2) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.add("notBefore", simpleDateFormat.format(date));
this.add("notAfter", simpleDateFormat.format(date2));
this.add("keySize", String.valueOf(n));
this.add("keyUsage", String.valueOf(n2));
this.add("email", string);
if (string2 != null) {
this.add("password", string2);
}
}
public String getAction() {
return "generateCert";
}
public GenerateCertificateMessage(String string, String string2, String string3, String string4, String string5, String string6, String string7, String string8, Date date, Date date2, int n, int n2, String string9, String string10) {
super(string);
this.add("alias", string2);
this.add("cn", string3);
if (string4 != null) {
this.add("ou", string4);
}
this.add("o", string5);
if (string6 != null) {
this.add("l", string6);
}
if (string7 != null) {
this.add("st", string7);
}
this.add("c", string8);
this.setCommon(date, date2, n, n2, string9, string10);
}
public GenerateCertificateMessage(String string, String string2, String string3, Date date, Date date2, int n, int n2, String string4, String string5) {
super(string);
this.add("alias", string2);
this.add("dn", string3);
this.setCommon(date, date2, n, n2, string4, string5);
}
}
@@ -0,0 +1,30 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.nre.util.LegacyStorageUtil
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.nre.util.LegacyStorageUtil;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
import java.io.IOException;
public class GetKeyMessage
extends KeyStoreMessage {
public String getAction() {
return "getKey";
}
public GetKeyMessage(String string, String string2, char[] cArray) {
super(string);
this.add("alias", string2);
if (cArray != null && cArray.length > 0) {
try {
this.add("password", LegacyStorageUtil.encode((String)String.valueOf(cArray)));
}
catch (IOException iOException) {}
}
}
}
@@ -0,0 +1,21 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.CryptoServletMessage;
public class GetProviderMessage
extends CryptoServletMessage {
public String getAction() {
return "getProvider";
}
public GetProviderMessage() {
}
public GetProviderMessage(String string) {
this.add("name", string);
}
}
@@ -0,0 +1,19 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.CryptoServletMessage;
public class KeyStoreMessage
extends CryptoServletMessage {
public KeyStoreMessage(String string) {
this.add("keyStoreType", string);
}
public KeyStoreMessage(String string, String string2) {
this.add("keyStoreType", string);
this.add("alias", string2);
}
}
@@ -0,0 +1,54 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
import java.io.OutputStream;
import java.security.cert.X509Certificate;
public class SetCertificateEntryMessage
extends KeyStoreMessage {
private String alias;
private X509Certificate cert;
public String getAction() {
return "setCertificateEntry";
}
public String getMethod() {
return "POST";
}
/*
* Exception decompiling
*/
public void write(OutputStream var1_1) {
/*
* This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
*
* org.benf.cfr.reader.util.ConfusedCFRException: Back jump on a try block [egrp 2[TRYBLOCK] [2 : 95->99)] java.lang.Throwable
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op02WithProcessedDataAndRefs.insertExceptionBlocks(Op02WithProcessedDataAndRefs.java:2283)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:415)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
* at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
* at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
* at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
* at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
* at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
* at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
* at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
* at org.benf.cfr.reader.Main.main(Main.java:54)
*/
throw new IllegalStateException("Decompilation failed");
}
public SetCertificateEntryMessage(String string, String string2, X509Certificate x509Certificate) {
super(string);
this.add("alias", string2);
this.alias = string2;
this.cert = x509Certificate;
}
}
@@ -0,0 +1,69 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.KeyStoreMessage;
import java.io.OutputStream;
import java.security.Key;
import java.security.cert.X509Certificate;
public class SetKeyEntryMessage
extends KeyStoreMessage {
private String alias;
private Key key;
private byte[] rawKey;
private char[] password;
private X509Certificate[] chain;
public String getAction() {
return "setKeyEntry";
}
public String getMethod() {
return "POST";
}
/*
* Exception decompiling
*/
public void write(OutputStream var1_1) {
/*
* This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
*
* org.benf.cfr.reader.util.ConfusedCFRException: Back jump on a try block [egrp 5[TRYBLOCK] [5 : 279->283)] java.lang.Throwable
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op02WithProcessedDataAndRefs.insertExceptionBlocks(Op02WithProcessedDataAndRefs.java:2283)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:415)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
* at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
* at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
* at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
* at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
* at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
* at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
* at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
* at org.benf.cfr.reader.Main.main(Main.java:54)
*/
throw new IllegalStateException("Decompilation failed");
}
public SetKeyEntryMessage(String string, String string2, byte[] byArray, X509Certificate[] x509CertificateArray) {
super(string);
this.add("alias", string2);
this.alias = string2;
this.chain = x509CertificateArray;
this.rawKey = byArray;
this.password = null;
}
public SetKeyEntryMessage(String string, String string2, Key key, char[] cArray, X509Certificate[] x509CertificateArray) {
super(string);
this.add("alias", string2);
this.alias = string2;
this.chain = x509CertificateArray;
this.key = key;
this.password = cArray;
}
}
@@ -0,0 +1,24 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.platcrypto.daemon.messages;
import com.tridium.platcrypto.daemon.messages.SetKeyEntryMessage;
import java.security.Key;
import java.security.cert.X509Certificate;
public class SetKeyEntryWithResponseMessage
extends SetKeyEntryMessage {
public String getAction() {
return "setKeyEntryWithResponse";
}
public SetKeyEntryWithResponseMessage(String string, String string2, byte[] byArray, X509Certificate[] x509CertificateArray) {
super(string, string2, byArray, x509CertificateArray);
}
public SetKeyEntryWithResponseMessage(String string, String string2, Key key, char[] cArray, X509Certificate[] x509CertificateArray) {
super(string, string2, key, cArray, x509CertificateArray);
}
}
@@ -0,0 +1,99 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.ui.BDaemonCnxHandler
* com.tridium.workbench.ord.BHostOrdFE
* javax.baja.naming.BOrd
* javax.baja.naming.OrdQuery
* javax.baja.security.BICredentials
* javax.baja.security.BUsernameAndPassword
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.util.Lexicon
*/
package com.tridium.platcrypto.daemon.ui;
import com.tridium.platcrypto.daemon.BDaemonSecureScheme;
import com.tridium.platcrypto.daemon.ui.BDaemonSecureSessionOrdFE;
import com.tridium.platform.ui.BDaemonCnxHandler;
import com.tridium.workbench.ord.BHostOrdFE;
import javax.baja.naming.BOrd;
import javax.baja.naming.OrdQuery;
import javax.baja.security.BICredentials;
import javax.baja.security.BUsernameAndPassword;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.util.Lexicon;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BDaemonSecureCnxHandler
extends BDaemonCnxHandler {
public static final Type TYPE;
private static final String KEY = "open.ssl.daemon";
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$ui$BDaemonSecureCnxHandler;
public Type getType() {
return TYPE;
}
public boolean isSecure() {
return true;
}
protected void saveHostAddress() throws Exception {
BOrd bOrd;
this.ordFE.setAutoSaveHistory(false);
this.hostOrd = bOrd = (BOrd)this.ordFE.saveValue();
this.port = 5011;
if (!bOrd.isNull()) {
OrdQuery[] ordQueryArray = bOrd.parse();
int n = 1;
while (n < ordQueryArray.length) {
if (ordQueryArray[n] instanceof BDaemonSecureScheme.DaemonQuery) {
BDaemonSecureScheme.DaemonQuery daemonQuery = (BDaemonSecureScheme.DaemonQuery)ordQueryArray[n];
this.port = daemonQuery.getPort();
this.tunnelAuthorities = daemonQuery.getTunnelAuthorities();
break;
}
++n;
}
}
}
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 BDaemonSecureCnxHandler() {
super(BDaemonSecureScheme.INSTANCE.getId(), 5011, (BHostOrdFE)new BDaemonSecureSessionOrdFE(), (BICredentials)new BUsernameAndPassword(), TYPE.getModule().getLexicon(), KEY);
}
public BDaemonSecureCnxHandler(Lexicon lexicon, String string) {
super(BDaemonSecureScheme.INSTANCE.getId(), 5011, (BHostOrdFE)new BDaemonSecureSessionOrdFE(), (BICredentials)new BUsernameAndPassword(), lexicon, string);
}
public BDaemonSecureCnxHandler(String string, int n, BHostOrdFE bHostOrdFE, BICredentials bICredentials, Lexicon lexicon, String string2) {
super(string, n, bHostOrdFE, bICredentials, lexicon, string2);
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$ui$BDaemonSecureCnxHandler;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$ui$BDaemonSecureCnxHandler = BDaemonSecureCnxHandler.class("[Lcom.tridium.platcrypto.daemon.ui.BDaemonSecureCnxHandler;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,68 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.daemon.BDaemonSession
* com.tridium.workbench.nav.BSessionAgent
* javax.baja.naming.BHost
* javax.baja.naming.BISession
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.xml.XElem
*/
package com.tridium.platcrypto.daemon.ui;
import com.tridium.platcrypto.daemon.BDaemonSecureSession;
import com.tridium.platform.daemon.BDaemonSession;
import com.tridium.workbench.nav.BSessionAgent;
import javax.baja.naming.BHost;
import javax.baja.naming.BISession;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BDaemonSecureSessionAgent
extends BSessionAgent {
public static final BDaemonSecureSessionAgent INSTANCE = new BDaemonSecureSessionAgent();
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$ui$BDaemonSecureSessionAgent;
public Type getType() {
return TYPE;
}
public void pickle(BISession bISession, XElem xElem) {
BDaemonSession bDaemonSession = (BDaemonSession)bISession;
xElem.addAttr("port", "" + bDaemonSession.getPort());
}
public BISession unpickle(BHost bHost, XElem xElem) {
int n = xElem.geti("port", 5011);
return BDaemonSecureSession.make(bHost, n, null);
}
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());
}
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$ui$BDaemonSecureSessionAgent;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$ui$BDaemonSecureSessionAgent = BDaemonSecureSessionAgent.class("[Lcom.tridium.platcrypto.daemon.ui.BDaemonSecureSessionAgent;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,61 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.platform.ui.BDaemonSessionOrdFE
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.platcrypto.daemon.ui;
import com.tridium.platform.ui.BDaemonSessionOrdFE;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BDaemonSecureSessionOrdFE
extends BDaemonSessionOrdFE {
public static final Type TYPE;
private static final int HTTPS_TUNNEL_PORT = 443;
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$ui$BDaemonSecureSessionOrdFE;
public Type getType() {
return TYPE;
}
protected int getDefaultPort() {
return 5011;
}
protected int getDefaultTunnelPort() {
return 443;
}
protected String getDefaultOrdScheme() {
return "platformssl";
}
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());
}
}
static {
Class clazz = class$com$tridium$platcrypto$daemon$ui$BDaemonSecureSessionOrdFE;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$daemon$ui$BDaemonSecureSessionOrdFE = BDaemonSecureSessionOrdFE.class("[Lcom.tridium.platcrypto.daemon.ui.BDaemonSecureSessionOrdFE;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}