2026-03-17 13:31:18 -07:00

65 lines
1.9 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.fox.sys.BFoxSession
* javax.baja.naming.BLocalHost
* javax.baja.security.crypto.CertManagerFactory
* javax.baja.sys.BComponent
*/
package com.tridium.platcrypto.fox;
import com.tridium.fox.sys.BFoxSession;
import com.tridium.platcrypto.fox.BCryptoChannel;
import java.io.IOException;
import javax.baja.naming.BLocalHost;
import javax.baja.security.crypto.CertManagerFactory;
import javax.baja.sys.BComponent;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public abstract class ChannelBase {
protected BCryptoChannel channel;
private BComponent parent;
protected void checkChannel() throws IOException {
if (!CertManagerFactory.isCertManagerActive()) {
return;
}
BFoxSession bFoxSession = (BFoxSession)this.parent.getSession();
this.channel = (BCryptoChannel)bFoxSession.getConnection().getChannels().get("crypto", BCryptoChannel.TYPE);
if (this.channel == null) {
throw new IOException("crypto fox channel not found");
}
}
public boolean isSecure() {
boolean bl = false;
if (!CertManagerFactory.isCertManagerActive()) {
return false;
}
BFoxSession bFoxSession = (BFoxSession)this.parent.getSession();
this.channel = (BCryptoChannel)bFoxSession.getConnection().getChannels().get("crypto", BCryptoChannel.TYPE);
if (this.channel != null) {
if (bFoxSession.getUseFoxs()) {
bl = true;
} else if (bFoxSession.getHost() instanceof BLocalHost) {
bl = true;
}
}
return bl;
}
private final /* synthetic */ void this() {
this.channel = null;
this.parent = null;
}
public ChannelBase(BComponent bComponent) {
this.this();
this.parent = bComponent;
}
}