From kde-pim Thu Mar 07 20:06:21 2013 From: Ingo =?iso-8859-15?q?Kl=F6cker?= Date: Thu, 07 Mar 2013 20:06:21 +0000 To: kde-pim Subject: Re: [Kde-pim] GPGSM always opens a pinentry: makes automated tests impossible Message-Id: <201303072106.26640 () thufir ! ingo-kloecker ! de> X-MARC-Message: https://marc.info/?l=kde-pim&m=136268681303456 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0082313968872401516==" --===============0082313968872401516== Content-type: multipart/signed; boundary=nextPart1434287.NKdfIIlezK; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-transfer-encoding: 7bit --nextPart1434287.NKdfIIlezK Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On Thursday 07 March 2013, Kevin Krammer wrote: > On Thursday, 2013-03-07, Sandro Knau=DF wrote: > > Hello, > >=20 > > I'm fixing the bugs now the tests in messageviewer(reviewboard > > #109325) and messagecomposer(reviewboard #109327), that are > > related to > > encryption/signing. I already fixed them but, they won't run in > > jenkins, because gpgsm (SMIME) always opens multiple pinentry > > windows (that has to closed via mouse). For me it only runs with. > > Only if I enter: > >=20 > > export GNUPGHOME=3D$KDE_SRC/kdepim/messagecore/tests/gnupg_home > > source `gpg-agent --daemon` > >=20 > > than only one pinentry window opens. > >=20 > > Someone knows how to get these tests running without pinentry > > window. > >=20 > > Keep in mind, that I never used gpgsm before, the workaround I > > build based on my knowledge with gpg. >=20 > I don't know either but maybe we could have a fake pinentry program > that delivers a predetermined passphrase. > The pinentry program seems to be specified by gpg-agent..conf so a > unit test environment could likely have a special version of that. Alternatively, we could create mocks for {Encrypt,Sign,EncryptSign}Job.=20 After all, we do not want to test encryption or signing, but just the=20 correct composition of signed and/or encrypted messages. Using mocks=20 will make this much simpler because they would always return the same=20 values. Hence a simple string comparison of the composed messages=20 against excepted result will do. With the real jobs checking a correct=20 result will be more difficult because the real jobs always return=20 different values (because the session key used for encryption is always=20 different and signatures contain a timestamp). Regards, Ingo --nextPart1434287.NKdfIIlezK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEABECAAYFAlE480IACgkQGnR+RTDgudjczwCfSbUr4IszdZdOpAMBV3tvgETF 4tkAn1UWuD9WRPa746CQ1XFXf6j/pzrw =eXoa -----END PGP SIGNATURE----- --nextPart1434287.NKdfIIlezK-- --===============0082313968872401516== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KDE PIM mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim KDE PIM home page at http://pim.kde.org/ --===============0082313968872401516==--