Explicitly include 'uncompressed' in preferred compression algos (#1020)
This commit is contained in:
parent
5a62c4f3c3
commit
e1b9156e72
|
@ -198,7 +198,8 @@ async function wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options) {
|
|||
], config.prefer_hash_algorithm);
|
||||
signaturePacket.preferredCompressionAlgorithms = createdPreferredAlgos([
|
||||
enums.compression.zlib,
|
||||
enums.compression.zip
|
||||
enums.compression.zip,
|
||||
enums.compression.uncompressed
|
||||
], config.compression);
|
||||
if (index === 0) {
|
||||
signaturePacket.isPrimaryUserID = true;
|
||||
|
|
|
@ -1679,7 +1679,7 @@ function versionSpecificTests() {
|
|||
const hash = openpgp.enums.hash;
|
||||
expect(key.users[0].selfCertifications[0].preferredHashAlgorithms).to.eql([hash.sha256, hash.sha512, hash.sha1]);
|
||||
const compr = openpgp.enums.compression;
|
||||
expect(key.users[0].selfCertifications[0].preferredCompressionAlgorithms).to.eql([compr.zlib, compr.zip]);
|
||||
expect(key.users[0].selfCertifications[0].preferredCompressionAlgorithms).to.eql([compr.zlib, compr.zip, compr.uncompressed]);
|
||||
expect(key.users[0].selfCertifications[0].features).to.eql(openpgp.config.v5_keys ? [7] : [1]);
|
||||
};
|
||||
const opt = {numBits: 512, userIds: 'test <a@b.com>', passphrase: 'hello'};
|
||||
|
@ -1721,7 +1721,7 @@ function versionSpecificTests() {
|
|||
const hash = openpgp.enums.hash;
|
||||
expect(key.users[0].selfCertifications[0].preferredHashAlgorithms).to.eql([hash.sha224, hash.sha256, hash.sha512, hash.sha1]);
|
||||
const compr = openpgp.enums.compression;
|
||||
expect(key.users[0].selfCertifications[0].preferredCompressionAlgorithms).to.eql([compr.zlib, compr.zip]);
|
||||
expect(key.users[0].selfCertifications[0].preferredCompressionAlgorithms).to.eql([compr.zlib, compr.zip, compr.uncompressed]);
|
||||
expect(key.users[0].selfCertifications[0].features).to.eql(openpgp.config.v5_keys ? [7] : [1]);
|
||||
};
|
||||
const opt = {numBits: 512, userIds: 'test <a@b.com>', passphrase: 'hello'};
|
||||
|
|
Loading…
Reference in New Issue
Block a user