diff --git a/test/general/key.js b/test/general/key.js index f7fedc26..7527f7dc 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -2846,7 +2846,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; @@ -2858,7 +2859,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;