Re: [Enigmail] package/tests/keyObj-test.js -- why claim gpg is older than it is?

2019-11-06 Thread Patrick Brunschwig
Hi Daniel

this test is to ensure that the openpgp.js variant of the source code is used, 
i.e to test the openpgp.js code. I think you should remove the complete set of 
test cases as you don't ship openpgp.js.



 Patrick

- Originale Nachricht -
Von: Daniel Kahn Gillmor 
Gesendet: 06.11.2019 - 17:14
An: Enigmail user discussion list 
Betreff: [Enigmail] package/tests/keyObj-test.js -- why claim gpg is older than 
it is?

> Hi Patrick--
> 
> package/tests/keyObj-test.js is failing on debian CI infrastructure
> (htttps://bugs.debian.org/944216) on the last two assertions (lines 53
> and 54):
> 
> 41  EnigmailGpg.agentVersion = "2.2.1";
> 42  Assert.ok(!EnigmailGpg.getGpgFeature("export-specific-uid"));
> 43
> 44  let minKey = keyObj.getMinimalPubKey("bob@somewhere.invalid");
> 45  Assert.equal(minKey.exitCode, 0);
> 46  Assert.equal(minKey.keyData.substr(3, 50), 
> "NBFub08oBDACmb04i4u8xUV1ADbnbN5l83mpr70OyWVJb5ElIc");
> 47  Assert.ok(minKey.keyData.substr(-50, 50) == 
> "1MU0qOC5SusatWeaebL9igZMla4aqtnLyRwLcsKODSTaZXQw==" ||
> 48minKey.keyData.substr(-50, 50) == 
> "p9TFNKjguUrrGrVnmnmy/YoGTJWuGqrZy8kcC3LCjg0k2mV0M=", "min key matches");
> 49
> 50  minKey = keyObj.getMinimalPubKey("does@not.exist");
> 51  Assert.equal(minKey.exitCode, 0);
> 52
> 53  Assert.equal(minKey.keyData.substr(0, 50), 
> "xsDNBFub08oBDACmb04i4u8xUV1ADbnbN5l83mpr70OyWVJb5E");
> 54  Assert.equal(minKey.keyData.substr(-50, 50), 
> "1MU0qOC5SusatWeaebL9igZMla4aqtnLyRwLcsKODSTaZXQw==");
> 55})));
> 
> Looking into the failure, i see that minKey is indeed a huge blob (see
> attachment below for a line-wrapped version of what is emitted).  It
> doesn't have the minimization i'd expect to be applied.
> 
> But I think this is happening because line 41 appears to deliberately
> cripple enigmail's GnuPG interface by making it think it is version
> 2.2.1.
> 
> What is the point of doing this test in this way?  Debian's package
> management is explicitly requring gnupg 2.2.8-2 and higher (basically
> 2.2.9, because of upstream fixes merged into 2.2.28).  So as far as i
> can tell this looks like gratuitous breakage.
> 
> But if it's testing something important, i'm reluctant to just strip it
> in debian.
> 
> Can you help me understand what it's for?
> 
> What do you think i should do about it?  Would you object to my removing
> these two final tests?  or maybe i should remove all the tests starting
> at line 41, since this is irrelevant for debian?  I just don't want to
> remove a safety check that i don't understand.  and i don't understand
> the purpose of these tests.
> 
> Regards,
> 
> --dkg
> 
> PS I've read the git history of package/tests/keyObj-test.js and the
>comments in there don't give me any additional illumination.
> 
> ___
> enigmail-users mailing list
> enigmail-users@enigmail.net
> To unsubscribe or make changes to your subscription click here:
> https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net



signature.asc
Description: OpenPGP digital signature
___
enigmail-users mailing list
enigmail-users@enigmail.net
To unsubscribe or make changes to your subscription click here:
https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net


Re: [Enigmail] package/tests/keyObj-test.js -- why claim gpg is older than it is?

2019-11-07 Thread Daniel Kahn Gillmor
On Wed 2019-11-06 22:04:34 +0100, Patrick Brunschwig wrote:

> this test is to ensure that the openpgp.js variant of the source code
> is used, i.e to test the openpgp.js code. I think you should remove
> the complete set of test cases as you don't ship openpgp.js.

Sorry, just to be clear: what do you see as "the complete set of test
cases"?

I plan to remove everything from lines 41-54 inclusive, unless i hear
otherwise from you :)

  --dkg


signature.asc
Description: PGP signature
___
enigmail-users mailing list
enigmail-users@enigmail.net
To unsubscribe or make changes to your subscription click here:
https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net