Warning: session_start(): open(/var/lib/php/sessions/sess_h1v2ph4uq9dtoq3uufcuigemhd, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
scope serverSocketFactory_botCompanyEtc.
import javax.net.*;
import javax.net.ssl.*;
static SNIKeyManager #keyManager;
sS #passphrase = "botcompany";
static File #trustKeyStoreFile;
static char[] #getPassphrase() {
ret getChars(passphrase);
}
static SNIKeyManager #makeSNIKeyManager() {
ret new SNIKeyManager(makeKeyManagerMap());
}
static Map> #makeKeyManagerMap() {
L dirs = sortByFileName(listDirsContainingFileNamed(javaxSecretDir(), "keystore.p12"));
char[] passphrase = getPassphrase();
ret (Map) mapToOrderedMap(dirs, dir -> pair(fileName(dir),
pair(keyManagerFromKeyStore(newFile(dir, "keystore.p12"), passphrase), fileName(dir))));
}
static SSLServerSocketFactory serverSocketFactory_botCompanyEtc() ctex {
trustKeyStoreFile = anyKeyStore();
if (trustKeyStoreFile == null) ret (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
KeyStore trustKeyStore = keyStoreFromFile(trustKeyStoreFile, getPassphrase());
SNIKeyManager wrappedKeyManager = makeSNIKeyManager();
keyManager = wrappedKeyManager;
//wrappedKeyManager.verbose = true;
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init(trustKeyStore);
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(new KeyManager[] {wrappedKeyManager}, trustManagerFactory.getTrustManagers(), null);
ret ctx.getServerSocketFactory();
}
svoid #update() {
keyManager.keyManagersByDomain = makeKeyManagerMap();
}
end scope