move keys to config
This commit is contained in:
@@ -27,13 +27,14 @@ class WTVClientSessionData {
|
||||
baddisk = false;
|
||||
clientAddress = null;
|
||||
user_id = 0;
|
||||
cryptoKey = "PNa$WN7gz}!T=t6X7^=|Ii##CEB~p\EP";
|
||||
cryptoKey = null;
|
||||
|
||||
constructor(minisrv_config, ssid) {
|
||||
if (!minisrv_config) throw ("minisrv_config required");
|
||||
var WTVShared = require("./WTVShared.js")['WTVShared'];
|
||||
var WTVMime = require("./WTVMime.js");
|
||||
this.minisrv_config = minisrv_config;
|
||||
this.cryptoKey = this.minisrv_config.config.keys.userdata;
|
||||
this.wtvshared = new WTVShared(minisrv_config);
|
||||
this.wtvmime = new WTVMime(minisrv_config);
|
||||
this.lockdown = false;
|
||||
|
||||
@@ -45,7 +45,7 @@ class WTVSec {
|
||||
*/
|
||||
constructor(minisrv_config, wtv_incarnation = 1) {
|
||||
this.minisrv_config = minisrv_config;
|
||||
this.initial_shared_key = CryptoJS.enc.Base64.parse(this.initial_shared_key_b64);
|
||||
this.initial_shared_key = CryptoJS.enc.Base64.parse(this.minisrv_config.config.keys.initial_shared_key);
|
||||
|
||||
if (this.initial_shared_key.sigBytes === 8) {
|
||||
this.incarnation = wtv_incarnation;
|
||||
|
||||
Reference in New Issue
Block a user