jfinn 2 лет назад
Родитель
Сommit
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,6 +16,9 @@ const DEBOUNCE_PERIOD = 5000;
16 16
 /**
17 17
  * This module integrates {@link E2EEContext} with {@link OlmAdapter} in order to distribute the keys for encryption.
18 18
  */
19
+
20
+
21
+
19 22
 export class ManagedKeyHandler extends KeyHandler {
20 23
     /**
21 24
      * Build a new AutomaticKeyHandler instance, which will be used in a given conference.
@@ -148,6 +151,7 @@ export class ManagedKeyHandler extends KeyHandler {
148 151
      * @private
149 152
      */
150 153
     async _rotateKeyImpl() {
154
+        console.log("ljm_dbg _rotateKeyImpl")
151 155
         logger.debug('Rotating key');
152 156
 
153 157
         this._key = this._generateKey();
@@ -162,6 +166,7 @@ export class ManagedKeyHandler extends KeyHandler {
162 166
      * @private
163 167
      */
164 168
     async _ratchetKeyImpl() {
169
+        console.log("ljm_dbg _ratchetKeyImpl")
165 170
         logger.debug('Ratchetting key');
166 171
 
167 172
         const material = await importKey(this._key);
@@ -231,3 +236,7 @@ export class ManagedKeyHandler extends KeyHandler {
231 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,11 +63,14 @@ const OlmAdapterEvents = {
63 63
  * These requessts and responses are transport independent. Currently they are sent using XMPP
64 64
  * MUC private messages.
65 65
  */
66
+console.log("ljm_dbg OlmAdapter!")
67
+
66 68
 export class OlmAdapter extends Listenable {
67 69
     /**
68 70
      * Creates an adapter instance for the given conference.
69 71
      */
70 72
     constructor(conference) {
73
+        clog("ljm_dbg OlmAdapter constructor")
71 74
         super();
72 75
 
73 76
         this._conf = conference;

+ 2
- 0
package.json Просмотреть файл

@@ -62,6 +62,8 @@
62 62
     "webpack-cli": "4.9.0"
63 63
   },
64 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 67
     "build": "npm run build:webpack && npm run build:tsc",
66 68
     "build:webpack": "LIB_JITSI_MEET_COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null) webpack",
67 69
     "build:tsc": "tsc --build --clean && tsc",

Загрузка…
Отмена
Сохранить