浏览代码

c1

rzv_feb
jfinn 2 年前
父节点
当前提交
565a4f6788
共有 3 个文件被更改,包括 14 次插入0 次删除
  1. 9
    0
      modules/e2ee/ManagedKeyHandler.js
  2. 3
    0
      modules/e2ee/OlmAdapter.js
  3. 2
    0
      package.json

+ 9
- 0
modules/e2ee/ManagedKeyHandler.js 查看文件

16
 /**
16
 /**
17
  * This module integrates {@link E2EEContext} with {@link OlmAdapter} in order to distribute the keys for encryption.
17
  * This module integrates {@link E2EEContext} with {@link OlmAdapter} in order to distribute the keys for encryption.
18
  */
18
  */
19
+
20
+
21
+
19
 export class ManagedKeyHandler extends KeyHandler {
22
 export class ManagedKeyHandler extends KeyHandler {
20
     /**
23
     /**
21
      * Build a new AutomaticKeyHandler instance, which will be used in a given conference.
24
      * Build a new AutomaticKeyHandler instance, which will be used in a given conference.
148
      * @private
151
      * @private
149
      */
152
      */
150
     async _rotateKeyImpl() {
153
     async _rotateKeyImpl() {
154
+        console.log("ljm_dbg _rotateKeyImpl")
151
         logger.debug('Rotating key');
155
         logger.debug('Rotating key');
152
 
156
 
153
         this._key = this._generateKey();
157
         this._key = this._generateKey();
162
      * @private
166
      * @private
163
      */
167
      */
164
     async _ratchetKeyImpl() {
168
     async _ratchetKeyImpl() {
169
+        console.log("ljm_dbg _ratchetKeyImpl")
165
         logger.debug('Ratchetting key');
170
         logger.debug('Ratchetting key');
166
 
171
 
167
         const material = await importKey(this._key);
172
         const material = await importKey(this._key);
231
         return window.crypto.getRandomValues(new Uint8Array(32));
236
         return window.crypto.getRandomValues(new Uint8Array(32));
232
     }
237
     }
233
 }
238
 }
239
+
240
+if (window?.glob_rx?.ljm?.j){
241
+   glob_rx.ljm.j.mkh = {KeyHandler,OlmAdapter,importKey, ratchet,debounce,JitsiConferenceEvents,ManagedKeyHandler,}
242
+}

+ 3
- 0
modules/e2ee/OlmAdapter.js 查看文件

63
  * These requessts and responses are transport independent. Currently they are sent using XMPP
63
  * These requessts and responses are transport independent. Currently they are sent using XMPP
64
  * MUC private messages.
64
  * MUC private messages.
65
  */
65
  */
66
+console.log("ljm_dbg OlmAdapter!")
67
+
66
 export class OlmAdapter extends Listenable {
68
 export class OlmAdapter extends Listenable {
67
     /**
69
     /**
68
      * Creates an adapter instance for the given conference.
70
      * Creates an adapter instance for the given conference.
69
      */
71
      */
70
     constructor(conference) {
72
     constructor(conference) {
73
+        clog("ljm_dbg OlmAdapter constructor")
71
         super();
74
         super();
72
 
75
 
73
         this._conf = conference;
76
         this._conf = conference;

+ 2
- 0
package.json 查看文件

62
     "webpack-cli": "4.9.0"
62
     "webpack-cli": "4.9.0"
63
   },
63
   },
64
   "scripts": {
64
   "scripts": {
65
+    "build0": "npm run build:webpack && npm run build:tsc && cp /usr/games/repos/ljm_a0/dist/umd/* /usr/games/repos/jitsi_relayz0/libs",
66
+    "build1": "npm run build:webpack --mode=development && npm run build:tsc && cp /usr/games/repos/ljm_a0/dist/umd/* /usr/games/repos/ljm_out/a0x",
65
     "build": "npm run build:webpack && npm run build:tsc",
67
     "build": "npm run build:webpack && npm run build:tsc",
66
     "build:webpack": "LIB_JITSI_MEET_COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null) webpack",
68
     "build:webpack": "LIB_JITSI_MEET_COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null) webpack",
67
     "build:tsc": "tsc --build --clean && tsc",
69
     "build:tsc": "tsc --build --clean && tsc",

正在加载...
取消
保存