-
Notifications
You must be signed in to change notification settings - Fork 120
Update RTCSession configuration to non deprecated names. #3267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
62fa425
to
1c975ab
Compare
2aecd64
to
7f90a0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what is the correct way to fix the ArrayBuffer thing... I put some suggestions
src/e2ee/matrixKeyProvider.ts
Outdated
@@ -44,7 +44,7 @@ export class MatrixKeyProvider extends BaseKeyProvider { | |||
encryptionKeyIndex: number, | |||
participantId: string, | |||
): void => { | |||
createKeyMaterialFromBuffer(encryptionKey).then( | |||
createKeyMaterialFromBuffer(encryptionKey.buffer as ArrayBuffer).then( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is a bit annoying, a .buffer
is not necessarly an ArrayBuffer?
I wonder why we are having this warning only now... TBH I don't understand
At the end it is calling subtle crypto importKey
that accepts An ArrayBuffer, a TypedArray, a DataView...
I don't know what is the best way to fix that.
We change our API to use ArrayBuffer? We call directly import key? or we request a change to createKeyMaterialFromBuffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So could be that:
crypto.subtle.importKey('raw', encryptionKey, 'HKDF', false, [
'deriveBits',
'deriveKey',
]).then(
If not what do we do if encryptionKey.buffer
is not an ArrayBuffer? Maybe we could throw an error ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a good idea to me. I just added a commit patching this.
e54e966
to
832972b
Compare
I just tried a to-device call with this and .dev and they seem to understand their keys (so we dont break the key format in a unexpected way. Which is the thing i was most concerned about) |
As introduced in: matrix-org/matrix-js-sdk#4714
Is blocked until we bump the js-sdk to a version supporting the new names.This pr now also updates the js-sdk version