mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-02 23:13:25 +00:00
Allow key.validate() to pass if it has a GNU dummy primary key
A valid signing subkey is required, in this case.
This commit is contained in:
@@ -2828,7 +2828,8 @@ describe('Key', function() {
|
||||
it('clearPrivateParams() - detect that private key parameters were removed', async function() {
|
||||
const key = await openpgp.key.readArmored(priv_key_rsa);
|
||||
await key.decrypt('hello world');
|
||||
const params = key.primaryKey.params;
|
||||
const signingKeyPacket = key.subKeys[0].keyPacket;
|
||||
const params = signingKeyPacket.params;
|
||||
await key.clearPrivateParams();
|
||||
key.primaryKey.isEncrypted = false;
|
||||
key.primaryKey.params = params;
|
||||
@@ -2840,7 +2841,8 @@ describe('Key', function() {
|
||||
it('clearPrivateParams() - detect that private key parameters were zeroed out', async function() {
|
||||
const { keys: [key] } = await openpgp.key.readArmored(priv_key_rsa);
|
||||
await key.decrypt('hello world');
|
||||
const params = key.primaryKey.params.slice();
|
||||
const signingKeyPacket = key.subKeys[0].keyPacket;
|
||||
const params = signingKeyPacket.params.slice();
|
||||
await key.clearPrivateParams();
|
||||
key.primaryKey.isEncrypted = false;
|
||||
key.primaryKey.params = params;
|
||||
|
||||
Reference in New Issue
Block a user