Fix decrypting newly generated key object when using the Worker
This commit is contained in:
parent
a731a607ce
commit
18474bdfb6
|
@ -415,6 +415,9 @@ SecretKey.prototype.postCloneTypeFix = function() {
|
||||||
if (this.keyid) {
|
if (this.keyid) {
|
||||||
this.keyid = type_keyid.fromClone(this.keyid);
|
this.keyid = type_keyid.fromClone(this.keyid);
|
||||||
}
|
}
|
||||||
|
if (this.s2k) {
|
||||||
|
this.s2k = type_s2k.fromClone(this.s2k);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SecretKey;
|
export default SecretKey;
|
||||||
|
|
|
@ -2210,6 +2210,16 @@ describe('Key', function() {
|
||||||
|
|
||||||
describe('V4', versionSpecificTests);
|
describe('V4', versionSpecificTests);
|
||||||
|
|
||||||
|
tryTests('V4 - With Worker', versionSpecificTests, {
|
||||||
|
if: typeof window !== 'undefined' && window.Worker,
|
||||||
|
before: async function() {
|
||||||
|
await openpgp.initWorker({ path: '../dist/openpgp.worker.js' });
|
||||||
|
},
|
||||||
|
after: function() {
|
||||||
|
openpgp.destroyWorker();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let v5_keysVal;
|
let v5_keysVal;
|
||||||
let aead_protectVal;
|
let aead_protectVal;
|
||||||
tryTests('V5', versionSpecificTests, {
|
tryTests('V5', versionSpecificTests, {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user