aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brunschwig <[email protected]>2021-12-05 15:47:59 +0100
committerPatrick Brunschwig <[email protected]>2021-12-05 15:47:59 +0100
commitb8cd97e8565e72de902092aa7436c705cad42eaa (patch)
tree1f12babf4751bf81316aa9f90aa820c38fae163e
parenta891bf184dab83801ce710829fdad1b8bab01f96 (diff)
downloadenigmail-openpgpjs-5.0.tar.gz
enigmail-openpgpjs-5.0.tar.bz2
enigmail-openpgpjs-5.0.zip
fixed evaluation of expiry dateopenpgpjs-5.0
-rw-r--r--package/cryptoAPI/pgpjs-keys.jsm4
-rw-r--r--package/cryptoAPI/pgpjs-keystore.jsm2
-rw-r--r--package/tests/openpgpjs-test.js2
-rw-r--r--package/tests/pgpjs-keystore-test.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/package/cryptoAPI/pgpjs-keys.jsm b/package/cryptoAPI/pgpjs-keys.jsm
index 22ff859e..113bdb11 100644
--- a/package/cryptoAPI/pgpjs-keys.jsm
+++ b/package/cryptoAPI/pgpjs-keys.jsm
@@ -212,7 +212,7 @@ var pgpjs_keys = {
sig.signerKeyId = EnigmailFuncs.arrayToHex(c.issuerFingerprint);
}
else {
- sig.signerKeyId = c.issuerKeyId.toHex().toUpperCase();
+ sig.signerKeyId = c.issuerKeyID.toHex().toUpperCase();
}
uid.sigList.push(sig);
}
@@ -233,7 +233,7 @@ var pgpjs_keys = {
sig.signerKeyId = EnigmailFuncs.arrayToHex(c.issuerFingerprint);
}
else {
- sig.signerKeyId = c.issuerKeyId.toHex().toUpperCase();
+ sig.signerKeyId = c.issuerKeyID.toHex().toUpperCase();
}
uid.sigList.push(sig);
}
diff --git a/package/cryptoAPI/pgpjs-keystore.jsm b/package/cryptoAPI/pgpjs-keystore.jsm
index 93d39a1d..b76e4cb4 100644
--- a/package/cryptoAPI/pgpjs-keystore.jsm
+++ b/package/cryptoAPI/pgpjs-keystore.jsm
@@ -201,7 +201,7 @@ var pgpjs_keyStore = {
}
// special handling for keys that expired after they were stored in DB
- if (key.expiryTime < now) {
+ if (key.expiryTime < now && key.expiryTime > 0) {
key.keyUseFor = key.keyUseFor.replace(/[CES]/g, "");
if (key.keyTrust.search(/^[fu]/) === 0) {
key.keyTrust = "e";
diff --git a/package/tests/openpgpjs-test.js b/package/tests/openpgpjs-test.js
index 1547410e..75b3a3f3 100644
--- a/package/tests/openpgpjs-test.js
+++ b/package/tests/openpgpjs-test.js
@@ -246,7 +246,7 @@ test(withTestGpgHome(withEnigmail(asyncTest(async function testKeyGen() {
Assert.equal(keyList.length, 1);
keyObj = keyList[0];
- Assert.equal(keyObj.keyTrust, "e");
+ Assert.equal(keyObj.keyTrust, "u");
Assert.equal(keyObj.userId, "Test User 2 <[email protected]>");
Assert.equal(keyObj.algoSym, "RSA");
Assert.equal(keyObj.subKeys.length, 1);
diff --git a/package/tests/pgpjs-keystore-test.js b/package/tests/pgpjs-keystore-test.js
index 8e3707bc..1587637b 100644
--- a/package/tests/pgpjs-keystore-test.js
+++ b/package/tests/pgpjs-keystore-test.js
@@ -96,7 +96,7 @@ test(withTestGpgHome(asyncTest(async function readWrite() {
Assert.equal(keyObj.keyCreated, 1430756251, "keyCreated");
Assert.equal(keyObj.created, EnigmailTime.getDateTime(1430756251, true, false), "created");
Assert.equal(keyObj.type, "pub", "type");
- Assert.equal(keyObj.keyTrust, "e", "keyTrust");
+ Assert.equal(keyObj.keyTrust, "f", "keyTrust");
Assert.equal(keyObj.expiryTime, 0, "expiryTime");
Assert.equal(keyObj.ownerTrust, "f", "ownerTrust");
Assert.equal(keyObj.keyUseFor, "cse", "keyUseFor");