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-DSA
As per spec: https://openpgp-pqc.github.io/draft-openpgp-pqc/draft-ietf-openpgp-pqc.html#section-5.3.2-1
- 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; | ||
} | ||
|
@@ -318,7 +318,7 @@ export default () => { | |
let pqcSigningKey; | ||
let pqcEncryptionSubkey; | ||
before(async () => { | ||
pqcSigningKey = await generatePrivateKeyObject({ type: 'pqc' }); | ||
pqcSigningKey = await generatePrivateKeyObject({ type: 'pqc', config: { v6Keys: true } }); | ||
pqcEncryptionSubkey = pqcSigningKey.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