From: "Laszlo Ersek" <lersek@redhat.com>
To: "Yao, Jiewen" <jiewen.yao@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Zurcher, Christopher J" <christopher.j.zurcher@intel.com>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>,
"Lu, XiaoyuX" <xiaoyux.lu@intel.com>
Subject: Re: [edk2-devel] [PATCH v3 1/3] CryptoPkg/BaseCryptLib: Add EVP (Envelope) Digest interface
Date: Wed, 16 Sep 2020 15:31:35 +0200 [thread overview]
Message-ID: <d64c2271-f868-494c-8956-a836578a260a@redhat.com> (raw)
In-Reply-To: <1096735a-182d-6ea1-99c2-d06e3caf4523@redhat.com>
On 09/16/20 14:39, Laszlo Ersek wrote:
> On 09/16/20 14:07, Yao, Jiewen wrote:
>> I overlooked the behavior that NULL DigestValue will take side effect to free Context.
>>
>> Hi Christopher
>> May I understand why we need free the context?
>> This does not align with other existing HASH or HMAC functions.
>
> I requested that.
>
> It makes no sense to keep a finalized context.
>
> In other words, it makes no sense to separate finalization from freeing.
> A context that has been finalized is unusable for anything except freeing.
To clarify my point about (DigestValue==NULL): the freeing of the
context is not tied to (DigestValue==NULL). When finalizing the context,
the context should *always* be freed. (DigestValue==NULL) only decides
whether we *only* free the context, or we store the computed digest *in
addition to* freeing the context.
So the unconditional part of the finalization is the freeing; the
conditional part is the storing of the digest.
Thanks
Laszlo
next prev parent reply other threads:[~2020-09-16 13:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 12:07 [edk2-devel] [PATCH v3 1/3] CryptoPkg/BaseCryptLib: Add EVP (Envelope) Digest interface Yao, Jiewen
2020-09-16 12:39 ` Laszlo Ersek
2020-09-16 12:56 ` Yao, Jiewen
2020-09-16 15:27 ` Laszlo Ersek
2020-09-16 13:31 ` Laszlo Ersek [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-16 0:58 [PATCH v3 0/3] " Zurcher, Christopher J
2020-09-16 0:59 ` [PATCH v3 1/3] " Zurcher, Christopher J
2020-09-16 11:06 ` [edk2-devel] " Laszlo Ersek
2020-09-16 11:44 ` Yao, Jiewen
2020-09-16 13:35 ` Laszlo Ersek
2020-09-16 14:17 ` Yao, Jiewen
2020-09-16 16:04 ` Laszlo Ersek
2020-09-17 1:21 ` Zurcher, Christopher J
2020-09-17 1:33 ` Yao, Jiewen
2020-09-17 1:44 ` Zurcher, Christopher J
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-list 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=d64c2271-f868-494c-8956-a836578a260a@redhat.com \
--to=devel@edk2.groups.io \
/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