From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82903 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C5=81ukasz?= Stelmach Newsgroups: gmane.emacs.gnus.general Subject: Re: [BUG] mml2015-epg-find-usable-key finds unusable key Date: Sat, 16 Feb 2013 22:11:03 +0100 Message-ID: <871ucg6k2g.fsf%stlman@poczta.fm> References: <87fw106la1.fsf%stlman@poczta.fm> <87bobk85tv.fsf%stlman@poczta.fm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1361049124 3406 80.91.229.3 (16 Feb 2013 21:12:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Feb 2013 21:12:04 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M31169@lists.math.uh.edu Sat Feb 16 22:12:26 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U6p3Z-0002MQ-75 for ding-account@gmane.org; Sat, 16 Feb 2013 22:12:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1U6p2l-00016W-5s; Sat, 16 Feb 2013 15:11:35 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1U6p2h-000167-Qp for ding@lists.math.uh.edu; Sat, 16 Feb 2013 15:11:31 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1U6p2f-0004QZ-TD for ding@lists.math.uh.edu; Sat, 16 Feb 2013 15:11:31 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1U6p2d-0006KY-NX for ding@gnus.org; Sat, 16 Feb 2013 22:11:27 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U6p2v-00025Z-QN for ding@gnus.org; Sat, 16 Feb 2013 22:11:45 +0100 Original-Received: from p54af4923.dip0.t-ipconnect.de ([84.175.73.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Feb 2013 22:11:45 +0100 Original-Received: from stlman by p54af4923.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Feb 2013 22:11:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p54af4923.dip0.t-ipconnect.de User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:3sBsjowrlmD8h7EIKT6e5Its5lU= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82903 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Daiki Ueno writes: > =C5=81ukasz Stelmach writes: > >> The patch needed a fix: there was a space before tab and my name for the >> changelog has been messed up (maybe due to encoding issues?). > > Perhaps it is because I didn't use attachment, but just inserted the > patch into the mail. It will be fixed in the git commit. > >> There are two more issues: >> >> 1. mml2015-find-usable-key is called from >> mml2015-epg-find-usable-secret-key. Your patch hasn't changed the >> invocation. > > Oops, right. Thanks for pointing this out. > >> 2. IMHO mml2015-epg-check-user-id should return true if a key id is >> passed as a uid to check. I assume that if a caller passes id to >> mml2015-find-usable-key find > > Yes, > >> + (string-match >> + "^\\(0x\\)?[[:xdigit:]]\\{8\\}\\([[:xdigit:]]\\{8\\}\\)?$" >> + recipient)) > > I think this can be simplified to: > > (not (string-match "\\`<" recipient)) > > since all the mml2015-epg-* functions normalize recipient addresses in > the form of "", so they only match email addresses. Indeed, however I still think we should check this the hard way: return t if and *only* if it is a key-id. The simpler check *might* result in information disclosure if a message is encrypted to a revoked uid. PS. This is a followup to some direct e-mails. =2D-=20 Mi=C5=82ego dnia, =C5=81ukasz --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQF8BAEBCgBmBQJRH/XyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5MEY5NEM3QTI4NzRFNDc2ODMwNEMxNEYw MEI2OTc2QzYzOTFEMzcxAAoJEAC2l2xjkdNxPu0H/3sSmwBiw0604/HPsTeX9OhI Bk3T5lLU3toATXcYpqY1W9v2mUP7yY5mzSDbHSudMsn7RKxU2umPw2s4A2Na+APx JbJ9Noqws671BVht6zcR9yDZi3M/y2JW9ZR7uJWyraUhrmeQNVRjIdq1mAARqWqV XBc/wdCTf62RoDhaI2lM/l9+m9eFh9YvtARSptD8+nu/e/i5Q8igrRYTvbCGh4mU cllPrlieQYZxM6o0mNRFm81p+y3hH8ROdhKDjYwWILdX2z8AQbUpXcvb2wpOwszh ueBD9fPNlbFfbtVwc9onQ4gTlYWoXBjM2DdeOMVsVZGyzg7LqLcUarWlrW8v6vY= =2KnW -----END PGP SIGNATURE----- --=-=-=--