diff --git a/CHANGELOG.md b/CHANGELOG.md index 0675453b..cce8c818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2.0.7 (2015-02-24) + +Features: + - Add a `no_check_keys` to KeyManager import routines for PGP. Needed in + the case of replacing an expired key. + - See here: https://github.com/keybase/keybase-issues/issues/1410 + ## 2.0.6 (2015-02-19) Features: diff --git a/lib/openpgp/keymanager.js b/lib/openpgp/keymanager.js index 115c0331..2eb476bf 100644 --- a/lib/openpgp/keymanager.js +++ b/lib/openpgp/keymanager.js @@ -1028,10 +1028,10 @@ _break() }; KeyManager.import_from_armored_pgp = function(_arg, cb) { - var armored, asp, binary, err, msg, raw, ret, warnings, ___iced_passed_deferral, __iced_deferrals, __iced_k, _ref5, _ref6; + var armored, asp, binary, err, msg, opts, raw, ret, warnings, ___iced_passed_deferral, __iced_deferrals, __iced_k, _ref5, _ref6; __iced_k = __iced_k_noop; ___iced_passed_deferral = iced.findDeferral(arguments); - armored = _arg.armored, raw = _arg.raw, binary = _arg.binary, asp = _arg.asp; + armored = _arg.armored, raw = _arg.raw, binary = _arg.binary, asp = _arg.asp, opts = _arg.opts; msg = binary; err = null; if (msg == null) { @@ -1057,7 +1057,8 @@ _break() }); KeyManager.import_from_pgp_message({ msg: msg, - asp: asp + asp: asp, + opts: opts }, __iced_deferrals.defer({ assign_fn: (function() { return function() { @@ -1291,10 +1292,10 @@ _break() }; KeyManager.import_from_pgp_message = function(_arg, cb) { - var asp, bundle, err, k, kb, msg, packets, warnings, ___iced_passed_deferral, __iced_deferrals, __iced_k, _ref5; + var asp, bundle, err, k, kb, msg, opts, packets, warnings, ___iced_passed_deferral, __iced_deferrals, __iced_k, _ref5; __iced_k = __iced_k_noop; ___iced_passed_deferral = iced.findDeferral(arguments); - msg = _arg.msg, asp = _arg.asp; + msg = _arg.msg, asp = _arg.asp, opts = _arg.opts; asp = ASP.make(asp); bundle = null; warnings = null; @@ -1304,7 +1305,7 @@ _break() (function(_this) { return (function(__iced_k) { if (err == null) { - kb = new KeyBlock(packets); + kb = new KeyBlock(packets, opts); (function(__iced_k) { __iced_deferrals = new iced.Deferrals(__iced_k, { parent: ___iced_passed_deferral, diff --git a/lib/openpgp/processor.js b/lib/openpgp/processor.js index 75daa87b..901f840b 100644 --- a/lib/openpgp/processor.js +++ b/lib/openpgp/processor.js @@ -30,7 +30,7 @@ verify_detached = require('./detachsign').verify; KeyBlock = (function() { - function KeyBlock(packets) { + function KeyBlock(packets, opts) { this.packets = packets; this.verified_signatures = []; this.subkeys = []; @@ -38,6 +38,7 @@ this.userids = []; this.user_attributes = []; this.warnings = new Warnings(); + this.opts = opts || {}; } KeyBlock.prototype.to_obj = function() { @@ -123,7 +124,7 @@ return err = arguments[0]; }; })(), - lineno: 85 + lineno: 86 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -133,7 +134,8 @@ }); })(this)((function(_this) { return function() { - if (err == null) { + var _ref1; + if (!((err != null) || ((_ref1 = _this.opts) != null ? _ref1.no_check_keys : void 0))) { err = _this._check_keys(); } return cb(err); @@ -203,7 +205,7 @@ return tmp = arguments[0]; }; })(), - lineno: 109 + lineno: 110 })); __iced_deferrals._fulfill(); })(function() { @@ -275,7 +277,7 @@ return index = arguments[2]; }; })(), - lineno: 150 + lineno: 151 })); __iced_deferrals._fulfill(); })(function() { @@ -301,7 +303,7 @@ return pkcs5 = arguments[2]; }; })(), - lineno: 156 + lineno: 157 })); __iced_deferrals._fulfill(); })(function() { @@ -359,7 +361,7 @@ return ret = arguments[1]; }; })(), - lineno: 178 + lineno: 179 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -401,7 +403,7 @@ return pkcs5 = arguments[2]; }; })(), - lineno: 192 + lineno: 193 }))); __iced_deferrals._fulfill(); }); @@ -421,7 +423,7 @@ return edat = arguments[0]; }; })(), - lineno: 194 + lineno: 195 }))); __iced_deferrals._fulfill(); })(function() { @@ -437,7 +439,7 @@ return plaintext = arguments[0]; }; })(), - lineno: 195 + lineno: 196 }))); __iced_deferrals._fulfill(); })(function() { @@ -453,7 +455,7 @@ return packets = arguments[0]; }; })(), - lineno: 196 + lineno: 197 }))); __iced_deferrals._fulfill(); })(function() { @@ -515,7 +517,7 @@ return inflated = arguments[0]; }; })(), - lineno: 206 + lineno: 207 }))); __iced_deferrals._fulfill(); })(function() { @@ -533,7 +535,7 @@ return p = arguments[0]; }; })(), - lineno: 208 + lineno: 209 }))); __iced_deferrals._fulfill(); })(function() { @@ -610,7 +612,7 @@ return i = arguments[2]; }; })(), - lineno: 246 + lineno: 247 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -637,7 +639,7 @@ return err = arguments[0]; }; })(), - lineno: 258 + lineno: 259 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -690,7 +692,7 @@ funcname: "Message._verify" }); _this._verify_sig(sig, esc(__iced_deferrals.defer({ - lineno: 272 + lineno: 273 }))); __iced_deferrals._fulfill(); })(_next); @@ -733,7 +735,7 @@ funcname: "Message._process_generic" }); _this._decrypt(esc(__iced_deferrals.defer({ - lineno: 285 + lineno: 286 }))); __iced_deferrals._fulfill(); }); @@ -746,7 +748,7 @@ funcname: "Message._process_generic" }); _this._inflate(esc(__iced_deferrals.defer({ - lineno: 286 + lineno: 287 }))); __iced_deferrals._fulfill(); })(function() { @@ -757,7 +759,7 @@ funcname: "Message._process_generic" }); _this._verify(esc(__iced_deferrals.defer({ - lineno: 287 + lineno: 288 }))); __iced_deferrals._fulfill(); })(function() { @@ -795,7 +797,7 @@ return literal = arguments[1]; }; })(), - lineno: 296 + lineno: 297 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -826,7 +828,7 @@ return packets = arguments[0]; }; })(), - lineno: 303 + lineno: 304 }))); __iced_deferrals._fulfill(); }); @@ -847,7 +849,7 @@ return literals = arguments[0]; }; })(), - lineno: 304 + lineno: 305 }))); __iced_deferrals._fulfill(); })(function() { @@ -885,7 +887,7 @@ return literals = arguments[1]; }; })(), - lineno: 313 + lineno: 314 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -923,7 +925,7 @@ return literals = arguments[1]; }; })(), - lineno: 322 + lineno: 323 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -945,7 +947,7 @@ return literals = arguments[1]; }; })(), - lineno: 324 + lineno: 325 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -966,7 +968,7 @@ return literals = arguments[1]; }; })(), - lineno: 326 + lineno: 327 })); __iced_deferrals._fulfill(); })(__iced_k); @@ -1028,7 +1030,7 @@ return literals = arguments[1]; }; })(), - lineno: 368 + lineno: 369 })); __iced_deferrals._fulfill(); })(function() { diff --git a/src/openpgp/keymanager.iced b/src/openpgp/keymanager.iced index dbbae192..809518a7 100644 --- a/src/openpgp/keymanager.iced +++ b/src/openpgp/keymanager.iced @@ -465,7 +465,7 @@ class KeyManager extends KeyManagerInterface # @param {callback} cb Callback with the result; # On success, we'll get an actual KeyManager. # - @import_from_armored_pgp : ({armored, raw, binary, asp}, cb) -> + @import_from_armored_pgp : ({armored, raw, binary, asp, opts}, cb) -> msg = binary err = null @@ -480,7 +480,7 @@ class KeyManager extends KeyManagerInterface err = new Error "Wanted a public or private key; got: #{msg.type}" unless err? - await KeyManager.import_from_pgp_message { msg, asp }, defer err, ret, warnings + await KeyManager.import_from_pgp_message { msg, asp, opts }, defer err, ret, warnings # For keys that have unprotected secret key data, just unlock # the secret key material by default, that way we don't have to @@ -542,14 +542,14 @@ class KeyManager extends KeyManagerInterface #-------------- # Import from a dearmored/decoded PGP message. - @import_from_pgp_message : ({msg, asp}, cb) -> + @import_from_pgp_message : ({msg, asp, opts}, cb) -> asp = ASP.make asp bundle = null warnings = null unless err? [err,packets] = parse msg.body unless err? - kb = new KeyBlock packets + kb = new KeyBlock packets, opts await kb.process defer err warnings = kb.warnings unless err? diff --git a/src/openpgp/processor.iced b/src/openpgp/processor.iced index 9484833f..46fc5cfc 100644 --- a/src/openpgp/processor.iced +++ b/src/openpgp/processor.iced @@ -16,7 +16,7 @@ verify_detached = require('./detachsign').verify class KeyBlock - constructor : (@packets) -> + constructor : (@packets, opts) -> # We'll throw away signatures that aren't verified. @verified_signatures = [] @subkeys = [] @@ -24,6 +24,7 @@ class KeyBlock @userids = [] @user_attributes = [] @warnings = new Warnings() + @opts = opts or {} #-------------------- @@ -84,7 +85,7 @@ class KeyBlock process : (cb) -> err = @_extract_keys() await @_verify_sigs defer err unless err? - err = @_check_keys() unless err? + err = @_check_keys() unless err? or @opts?.no_check_keys cb err #-------------------- diff --git a/test/data/keys.iced b/test/data/keys.iced index 79da52bc..b08f04f6 100644 --- a/test/data/keys.iced +++ b/test/data/keys.iced @@ -254,7 +254,7 @@ q7hUgR5UBK/ZzCloYJ2rEQ6NswZyu8TogJR9lsEFjvTwsWkWnJtq+eHe5xLkaj4x TG7+jNX/sxebF6IUf9rlHpRSTg== =OENT -----END PGP PUBLIC KEY BLOCK----- -""", +""", sneak : """ -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 @@ -5990,34 +5990,34 @@ lFBRIGSmMXQzAT3lg+eRKx9b1ArOArYN -----END PGP PUBLIC KEY BLOCK----- """, ophelia : """ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: iPGMail (2.0.9) +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: iPGMail (2.0.9) -mQENBFMkc1cBCAC9OX/sR2Fz4qbz+cyQyPG6fmZJKFGcZgfzx0s8pC/NNIpiatYAO/UWrq8+p9pj -a8YJfXS4aX+49tyiBq2zuXraZ9pqQwdjaBGRkXLZyf/9neiKZLvP0Ydcca/CYG2wro7is3lMOm+1 -ikxW/jvmunNbtzwdcmlOwvB2/5XVBHmIEBP3bNmNV0Bwqq1WKWn37LHDvGwOqAJAVPHuGn+nyf12 -MFEjNA6voabH9XYb1BF3S9Kk7e7n6GgLGT1dfyHiLNg8F6ogOLF2GPq9a7ULS/ac438j6g0ejW0t -1pJ0YG5TLru55rlkNZMXEeP+rZa8SUPOlVoS+ewYwXOXFKtBtApjABEBAAG0KW9wa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uQENBFMkc1gBCADRRVxUILOABvJoTRDuSha9JDWPc1rcBSnzWjHtcqUgsSKod+fkKzBq +iOi9KPUY5WPVSotxuQ0p4bArtzTxF4m/OM53UnU7DiPqX8RkTOroRY2FKhzbU0qSdyrVTEFrDftP +PCGLx50+xncLTjBNH1Boax++Nx+YDP7K9uh5C43A4ZQ7UnO0p9yMaMhOZsb5nLMg4OffIkB7hxn0 +2jyi5tYwZ0c8qnxljWaBxNeDkj7O2V8bhacYLAW9lN3OZzBJVkbHXBO4Ci1AuYhbDEaa7UjOWyW7 +e9lJC02My+wddZEhKBpjn1q5lHw6yanXgWj1PaiRGFB6N9t/kSvbPbCP6xuBABEBAAGJASoEGAEI +ABQFAlMkc1gCGwwFCQHhM4AECwkIBwAKCRCIwwSk8j6VN7iuB/0XayV6xlYIbUE7aKrHmNVh5+Nv +W6cxLkl7paDvrl/2XHIGssPho6oYwGqdItNikiCEW8CgGLHIxiP6P0T3MlX88o7jF03prclauQIa +fsAAYLzfXPwm3tb0kphn3ZrqcmcnWUW7P0Yacq0Djj1s1aPXiHHyk5V/ECkcpM1eD9JMu0Ghj1iG +pgFoq7NXpfxrloIPWh1i7zodZsYwZ4gmgGEGlNmBzVmVfQ21oXR3UV7Yb7lQC1zlnGOh2Sf4azLT +ehWvoJu34YC3AzNIBhXYjxX2q8DenOOKzzFQT6bZPsNw0ZQ5lMwxHJutUazIa6cmwygACZEQxQpi +HExnQiI36Gt0 +=Ql+q ------END PGP PUBLIC KEY BLOCK----- +-----END PGP PUBLIC KEY BLOCK----- """, bitfolk : """ -----BEGIN PGP PUBLIC KEY BLOCK----- @@ -9993,5 +9993,41 @@ mEocZ1jBcw/WVYxfM1ry+1hWgyNUcTAMKWcygeXKFL4CbVfFgoOc1Ts+QN/iwcdp QDKzR0R6SdpckAqP0NPvzNSI4EO5u7RepkExbQagMhA= =icYF -----END PGP PUBLIC KEY BLOCK----- -""" +""", + feld : """-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuP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AKS +4jn1DUhwARXE4JvkISuDcq5iIK21O1eRZEBIaamqG+IsTqNkpRRuj+zeShqTEitQ +IwP8JarXaXt2GHfeL9Jm6CKUr5kAGtDyvDXK7zL1MtimX+4Q3kRP2dkYlXUkLhrf +FsqJrPQiEuKTiKogBSYVfNrMb95V3A6uVz/j67t7ruAHkJEO4nWouW2558EfRL59 +/Lln8I65AQ0EUn5+xwEIANFQczLvVkdkxEDw93QyV7GEgZeULQxNPX1gkJotTATz +1SFgciHCLuOTFQtbVvC/rfOLdqxqSONyga0gNtwqKJV804lvVAQ2+EuKs/gOUT9p +LKhasyQVsSLRs2vp3Z5jEVXbmVTXd3/fdeFcgC+vfiEYnhByPlbQ1LOg54dHC0SM +MrEraYP3IX7Hi9r+84jA5JBVFq908ok6G+rsqPenpq0u+hJ6DVXnVX5UZAJZVaDo +HoCgqPa4pW6nWXIcQGTKXWfp/6OC9Yt4Izab3wEzVhWer7Lv4Q6ZmYvSSldNdxCO +39/MQJKQH6+R8feyqZXGcqjjNMmsB+/NCTVV5t7qi/8AEQEAAYkBJQQYAQoADwIb +DAUCVFobQAUJA8NneQAKCRCYO2RQHxPiUqfCCACZMsiQuaubGSTZk6LX+5c/sg+E +8T/npJrMp3aYxKTsVzxvH1O/Hw0gmu+m5km6ZSJf1S3RGnqddHxu+DMBqL7zlKaA +pEF+A7cQabpHRt/pRE2jrjDJQaBfu+nwt5yuTgt/y2CRC+xz9RXfvC4XCAeKBoYH +js7vEtPw06eTabWTbo+1Qxa1g32b331ZDxgQ7gFyrA840ZIqq+S8KVBEARijtBsJ +DEoqaHuYJtXxtebMidtXJbxPtyh/ZShCXV1oll2dykwXD499HjuHEDATvIhw4UXD +8rST+PezJ284JATq8JI6nXz2gKVRE+M1P1pklB6vt5QkCLAo3o5O2MoA0mHj +=LK32 +-----END PGP PUBLIC KEY BLOCK-----""" } diff --git a/test/files/decode_pgp.iced b/test/files/decode_pgp.iced index 7081998f..bc954ede 100644 --- a/test/files/decode_pgp.iced +++ b/test/files/decode_pgp.iced @@ -346,3 +346,15 @@ exports.public_key_expired_both = (T,cb) -> cb() #============================================================================ + +exports.public_key_expired_uid_bypass = (T,cb) -> + raw = keys.feld + await KeyManager.import_from_armored_pgp { raw } , defer err + T.assert err?, "error back for expired UID" + await KeyManager.import_from_armored_pgp { raw, opts : { no_check_keys : true } } , defer err, km + T.no_error err + T.equal km.get_pgp_fingerprint_str(), "748193e6c4171c8a4b6b2488983b64501f13e252", "the right fp came back" + cb() + +#============================================================================ +