Received: from list by lists.gnu.org with archive (Exim 4.71) id 1g9sNO-0007K7-UV for mharc-grub-devel@gnu.org; Tue, 09 Oct 2018 09:48:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9sNN-0007Ig-Hj for grub-devel@gnu.org; Tue, 09 Oct 2018 09:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9sNI-0002eQ-FT for grub-devel@gnu.org; Tue, 09 Oct 2018 09:48:41 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:42516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9sNH-0002Uq-VI for grub-devel@gnu.org; Tue, 09 Oct 2018 09:48:36 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w99DibC1137963; Tue, 9 Oct 2018 13:48:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=43u63kkubA0VtvXlF3qjsPXp3kTlXVyAGx2w7ILZUd0=; b=yG8hkec1elLkQrUjk8319Pl/eZePvk/+tUE+WW4sxHFIipk0L3jflmEqV1vRTdj6ughO A5xydM0GimsaG+hDLZtoJvK6FCcYfRmFilbIcHD66cW2+bNi1kMbOAHi60krYcNM4L6Y BmTCNA6w8BJqldRb4U1X5NVqrXamQvTVWgpirX8XmGlGP9VYxhap6VPWOlz5LaxgciTM tCpbs0Kwbp5UkBxI9UwL4Ii2XCDmd1I+mFwadp6CK3tq43VcRZ8wH89nYUSPUf/ZcEHz R7hV7NvWDaTIE2ipJUfb8zIAujc3mnDDtsKsPWLeN9D4OM7Wl6kH0hvz8npb9JTztOcj wQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2mxmftnf25-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Oct 2018 13:48:31 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w99DmUBE012537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Oct 2018 13:48:30 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w99DmTOv029720; Tue, 9 Oct 2018 13:48:30 GMT Received: from olila.i.net-space.pl (/10.175.174.86) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Oct 2018 13:48:29 +0000 Date: Tue, 9 Oct 2018 15:48:23 +0200 From: Daniel Kiper To: Ross Philipson Cc: grub-devel@gnu.org, dpsmith.dev@gmail.com, eric.snowberg@oracle.com, javierm@redhat.com, jonmccune@google.com, kanth.ghatraju@oracle.com, keng-yu.lin@hpe.com, konrad.wilk@oracle.com, leif.lindholm@linaro.org, mjg59@srcf.ucam.org, phcoder@gmail.com, philip.b.tricca@intel.com Subject: Re: [PATCH v3 2/8] verifiers: Framework core Message-ID: <20181009134823.GD4472@olila.i.net-space.pl> References: <1538559415-6233-1-git-send-email-daniel.kiper@oracle.com> <1538559415-6233-3-git-send-email-daniel.kiper@oracle.com> <152e87e9-e070-da1a-4353-8ef6f1bfbf6b@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152e87e9-e070-da1a-4353-8ef6f1bfbf6b@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9040 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810090136 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 13:48:42 -0000 On Wed, Oct 03, 2018 at 01:55:08PM -0400, Ross Philipson wrote: > On 10/03/2018 05:36 AM, Daniel Kiper wrote: [...] > > +struct grub_file_verifier grub_pubkey_verifier = > > + { > > + .name = "pgp", > > + .init = grub_pubkey_init, > > + .fini = grub_pubkey_fini, > > + .write = grub_pubkey_write, > > + .close = grub_pubkey_close, > > + }; > > If I am reading this correctly, most of the first part of this is > re-factoring the signature/pubkey verifier code to fit in with your new > framework of verifiers, is that correct? So even though a bunch of code > moved around and changed to some degree, it should be functionally > basically the same? That is the goal... [...] > > diff --git a/include/grub/file.h b/include/grub/file.h > > index e2795d1..c55901c 100644 > > --- a/include/grub/file.h > > +++ b/include/grub/file.h > > @@ -170,7 +170,7 @@ extern grub_disk_read_hook_t EXPORT_VAR(grub_file_progress_hook); > > /* Filters with lower ID are executed first. */ > > typedef enum grub_file_filter_id > > { > > - GRUB_FILE_FILTER_PUBKEY, > > + GRUB_FILE_FILTER_VERIFY, > > I guess this kind of goes with my question above. Previously there was > only one "verifier" and that was the pubkey verifier. Now the pubkey > verifier will be one of many right? Yep. Daniel