From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA610C7618F for ; Thu, 18 Jul 2019 23:26:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC65A20873 for ; Thu, 18 Jul 2019 23:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726015AbfGRX0V (ORCPT ); Thu, 18 Jul 2019 19:26:21 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:53738 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbfGRX0V (ORCPT ); Thu, 18 Jul 2019 19:26:21 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 12BDB72CA65; Fri, 19 Jul 2019 02:26:19 +0300 (MSK) Received: from altlinux.org (sole.flsd.net [185.75.180.6]) by imap.altlinux.org (Postfix) with ESMTPSA id D3EF64A4A29; Fri, 19 Jul 2019 02:26:18 +0300 (MSK) Date: Fri, 19 Jul 2019 02:26:18 +0300 From: Vitaly Chikunov To: Mimi Zohar Cc: Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org Subject: Re: [PATCH 2/3] ima-evm-utils: Remove not needed argument from verify_hash_v2 Message-ID: <20190718232617.buo6pcvtncntcdxg@altlinux.org> Mail-Followup-To: Mimi Zohar , Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org References: <20190718213510.10829-1-vt@altlinux.org> <20190718213510.10829-2-vt@altlinux.org> <1563492201.4539.339.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <1563492201.4539.339.camel@linux.ibm.com> User-Agent: NeoMutt/20171215-106-ac61c7 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Mimi, On Thu, Jul 18, 2019 at 07:23:21PM -0400, Mimi Zohar wrote: > On Fri, 2019-07-19 at 00:35 +0300, Vitaly Chikunov wrote: > > Since we now always call verify_hash_v2() with NULL keyfile (assuming > > all keys are already loaded into public_keys list), remove keyfile > > argument and its handling from verify_hash_v2(). > > > > Signed-off-by: Vitaly Chikunov > > Thanks! > > > --- > > src/libimaevm.c | 21 +++++++-------------- > > 1 file changed, 7 insertions(+), 14 deletions(-) > > > > diff --git a/src/libimaevm.c b/src/libimaevm.c > > index 97b7167..b153f1b 100644 > > --- a/src/libimaevm.c > > +++ b/src/libimaevm.c > > @@ -453,7 +453,7 @@ void init_public_keys(const char *keyfiles) > > * Return: 0 verification good, 1 verification bad, -1 error. > > */ > > int verify_hash_v2(const char *file, const unsigned char *hash, int size, > > - unsigned char *sig, int siglen, const char *keyfile) > > + unsigned char *sig, int siglen) > > { > > While making this change, could we also make both this and > verify_hash_v1() functions static? Yes, I wonder why they wasn't static in the first place. > Should I make the change? OK! Thanks,