Test non-ASCII notation name
This commit is contained in:
parent
911e0f5330
commit
70778bc4c4
|
@ -1154,6 +1154,11 @@ eSvSZutLuKKbidSYMLhWROPlwKc2GU2ws6PrLZAyCAel/lU=
|
||||||
name: 'test@example.com',
|
name: 'test@example.com',
|
||||||
value: new TextEncoder().encode('test'),
|
value: new TextEncoder().encode('test'),
|
||||||
humanReadable: true
|
humanReadable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'séparation-de-domaine@proton.ch',
|
||||||
|
value: new Uint8Array([0, 1, 2, 3]),
|
||||||
|
humanReadable: false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
config
|
config
|
||||||
|
@ -1164,11 +1169,15 @@ eSvSZutLuKKbidSYMLhWROPlwKc2GU2ws6PrLZAyCAel/lU=
|
||||||
verificationKeys: privKey
|
verificationKeys: privKey
|
||||||
});
|
});
|
||||||
const { packets: [{ rawNotations: notations }] } = await sig.signature;
|
const { packets: [{ rawNotations: notations }] } = await sig.signature;
|
||||||
expect(notations).to.have.length(1);
|
expect(notations).to.have.length(2);
|
||||||
expect(notations[0].name).to.equal('test@example.com');
|
expect(notations[0].name).to.equal('test@example.com');
|
||||||
expect(notations[0].value).to.deep.equal(new Uint8Array([116, 101, 115, 116]));
|
expect(notations[0].value).to.deep.equal(new Uint8Array([116, 101, 115, 116]));
|
||||||
expect(notations[0].humanReadable).to.be.true;
|
expect(notations[0].humanReadable).to.be.true;
|
||||||
expect(notations[0].critical).to.be.false;
|
expect(notations[0].critical).to.be.false;
|
||||||
|
expect(notations[1].name).to.equal('séparation-de-domaine@proton.ch');
|
||||||
|
expect(notations[1].value).to.deep.equal(new Uint8Array([0, 1, 2, 3]));
|
||||||
|
expect(notations[1].humanReadable).to.be.false;
|
||||||
|
expect(notations[1].critical).to.be.false;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Verify cleartext signed message with two signatures with openpgp.verify', async function() {
|
it('Verify cleartext signed message with two signatures with openpgp.verify', async function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user