-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hmm why is it not working in browsers with jose?
- Loading branch information
1 parent
de14435
commit f4422b8
Showing
6 changed files
with
68 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -278,6 +278,7 @@ describe('encrypt decrypt test', async function () { | |
authProvider, | ||
}); | ||
const keyPair = await crypto.subtle.generateKey( | ||
const assertionKeys = await crypto.subtle.generateKey( | ||
{ | ||
name: 'RSASSA-PKCS1-v1_5', | ||
modulusLength: 2048, | ||
|
@@ -287,7 +288,7 @@ describe('encrypt decrypt test', async function () { | |
true, | ||
['sign', 'verify'] | ||
); | ||
const publicKey = keyPair.publicKey; | ||
const assertionPublicKey = assertionKeys.publicKey; | ||
const scope: Scope = { | ||
dissem: ['[email protected]'], | ||
attributes: [], | ||
|
@@ -297,6 +298,8 @@ describe('encrypt decrypt test', async function () { | |
const hs256Key = new Uint8Array(32); | ||
crypto.getRandomValues(hs256Key); | ||
|
||
console.log('ASDF about to encrypt'); | ||
|
||
const encryptedStream = await client.encrypt({ | ||
metadata: Mocks.getMetadataObject(), | ||
wrappingKeyAlgorithm: encapKeyType, | ||
|
@@ -337,7 +340,7 @@ describe('encrypt decrypt test', async function () { | |
appliesToState: 'encrypted', | ||
signingKey: { | ||
alg: 'RS256', | ||
key: keyPair.privateKey, | ||
key: assertionKeys.privateKey, | ||
}, | ||
}, | ||
{ | ||
|
@@ -364,7 +367,7 @@ describe('encrypt decrypt test', async function () { | |
}, | ||
assertion2: { | ||
alg: 'RS256', | ||
key: publicKey, | ||
key: assertionPublicKey, | ||
}, | ||
}, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters