forked from openpgpjs/openpgpjs
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow generating and parsing v4 keys of type ML-KEM
- Loading branch information
Showing
4 changed files
with
20 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,7 @@ async function cloneKeyPacket(key) { | |
} | ||
|
||
async function generatePrivateKeyObject(options) { | ||
const config = { rejectCurves: new Set() }; | ||
const config = { rejectCurves: new Set(), ...options.config }; | ||
const { privateKey } = await openpgp.generateKey({ ...options, userIDs: [{ name: 'Test', email: '[email protected]' }], format: 'object', config }); | ||
return privateKey; | ||
} | ||
|
@@ -317,7 +317,7 @@ export default () => { | |
describe('PQC parameter validation', function() { | ||
let pqcEncryptionSubkey; | ||
before(async () => { | ||
const key = await generatePrivateKeyObject({ type: 'symmetric', subkeys: [{ type: 'pqc' }] }); | ||
const key = await generatePrivateKeyObject({ type: 'symmetric', subkeys: [{ type: 'pqc', config: { v6Keys: true } }] }); | ||
pqcEncryptionSubkey = key.subkeys[0]; | ||
}); | ||
|
||
|
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