Page MenuHomePhorge

D9423.1769107593.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D9423.1769107593.diff

diff --git a/keyserver/src/responders/keys-responders.js b/keyserver/src/responders/keys-responders.js
--- a/keyserver/src/responders/keys-responders.js
+++ b/keyserver/src/responders/keys-responders.js
@@ -19,7 +19,6 @@
import { verifyClientSupported } from '../session/version.js';
import type { Viewer } from '../session/viewer.js';
import { fetchCallUpdateOlmAccount } from '../updaters/olm-account-updater.js';
-import { validateAccountPrekey } from '../utils/olm-utils.js';
type AccountKeysSet = {
+identityKeys: string,
@@ -50,7 +49,6 @@
): Promise<AccountKeysSet> {
const identityKeys = account.identity_keys();
- await validateAccountPrekey(account);
const prekey = account.prekey();
const prekeySignature = account.prekey_signature();
diff --git a/keyserver/src/user/login.js b/keyserver/src/user/login.js
--- a/keyserver/src/user/login.js
+++ b/keyserver/src/user/login.js
@@ -14,10 +14,7 @@
} from './identity.js';
import { getMessageForException } from '../responders/utils.js';
import { fetchCallUpdateOlmAccount } from '../updaters/olm-account-updater.js';
-import {
- getAccountPrekeysSet,
- validateAccountPrekey,
-} from '../utils/olm-utils.js';
+import { getAccountPrekeysSet } from '../utils/olm-utils.js';
type UserCredentials = { +username: string, +password: string };
@@ -31,7 +28,6 @@
function retrieveAccountKeysSet(account: OlmAccount): AccountKeysSet {
const identityKeys = account.identity_keys();
- validateAccountPrekey(account);
const { prekey, prekeySignature } = getAccountPrekeysSet(account);
if (!prekeySignature || !prekey) {
diff --git a/keyserver/src/utils/olm-utils.js b/keyserver/src/utils/olm-utils.js
--- a/keyserver/src/utils/olm-utils.js
+++ b/keyserver/src/utils/olm-utils.js
@@ -134,15 +134,6 @@
return cachedOLMUtility;
}
-function validateAccountPrekey(account: OlmAccount) {
- if (shouldRotatePrekey(account)) {
- account.generate_prekey();
- }
- if (shouldForgetPrekey(account)) {
- account.forget_old_prekey();
- }
-}
-
async function uploadNewOneTimeKeys(numberOfKeys: number) {
const [rustAPI, identityInfo, deviceID] = await Promise.all([
getRustAPI(),
@@ -266,7 +257,6 @@
getOlmUtility,
unpickleOlmAccount,
unpickleOlmSession,
- validateAccountPrekey,
uploadNewOneTimeKeys,
getContentSigningKey,
getAccountPrekeysSet,

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 22, 6:46 PM (15 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5979508
Default Alt Text
D9423.1769107593.diff (2 KB)

Event Timeline