linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Vitaly Chikunov <vt@altlinux.org>
Cc: linux-integrity@vger.kernel.org, zohar@linux.ibm.com,
	dmitry.kasatkin@gmail.com
Subject: Re: [PATCH v2 2/3] tests: Add program to create IMA signature with new API call
Date: Tue, 27 Apr 2021 19:55:43 -0400	[thread overview]
Message-ID: <e1f787a6-3308-6083-dbc5-2705fb7e7b88@linux.ibm.com> (raw)
In-Reply-To: <20210427222601.ednotpq7gur36g62@altlinux.org>


On 4/27/21 6:26 PM, Vitaly Chikunov wrote:
> Stefan,
>
> On Tue, Apr 27, 2021 at 03:31:32PM -0400, Stefan Berger wrote:
>> Since the new API call is not used by evmctl, implement a test program
>> 'create_ima_signature' to use it. Extend _evmctl_sign to also created
>> IMA v2 signatures with RSA keys using this test program and compare the
>> results.
>>
>> Evmctl's signature creation path is unmodified at this point, so the tests
>> ensure that the existing sign_hash_v2 and the new sign_hash_v2_pkey create
>> identical (RSA) signatures.
>>
>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>> ---
>>   tests/Makefile.am            |   6 ++
>>   tests/create_ima_signature.c | 111 +++++++++++++++++++++++++++++++++++
> Why not add this to evmctl?


evmctl has 3 callers to the 'competing' function sign_hash(), all of 
which of course let the code path under sign_hash() read the key from 
the file (and access the keypassword via a global variable :(( ). I 
didn't want to pull up the reading of the key into evmctl, which we 
would have to do in case we wanted to call this new function. Also then 
the question is which callers to replace? All of them, or which ones?


  reply	other threads:[~2021-04-27 23:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 19:31 [PATCH v2 0/3] ima-evm-utils: Implement function to only create IMA signature Stefan Berger
2021-04-27 19:31 ` [PATCH v2 1/3] libimaevm: Implement imaevm_create_ima_signature Stefan Berger
2021-04-27 19:31 ` [PATCH v2 2/3] tests: Add program to create IMA signature with new API call Stefan Berger
2021-04-27 22:26   ` Vitaly Chikunov
2021-04-27 23:55     ` Stefan Berger [this message]
2021-04-27 19:31 ` [PATCH v2 3/3] libimaevm: Have sign_hash_v2 call sign_hash_v2_pkey after reading key file Stefan Berger
2021-05-10 13:55 ` [PATCH v2 0/3] ima-evm-utils: Implement function to only create IMA signature Stefan Berger
2021-05-10 15:40   ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1f787a6-3308-6083-dbc5-2705fb7e7b88@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=vt@altlinux.org \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).