[Swan-dev] cavp question
Andrew Cagney
andrew.cagney at gmail.com
Mon Aug 21 19:20:35 UTC 2017
On 21 August 2017 at 12:59, Andrew Cagney <andrew.cagney at gmail.com> wrote:
> On 20 August 2017 at 00:02, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>> This code in testing/cavp/cavp_ikev1.c looks fishy:
>>
>> if (prf == NULL) {
>> print_line(prf->key);
>> return;
>> }
>>
>> My best guess is that the test is suposed to be:
>> if (prf->prf == NULL) {
>
> Yes. Here, prf is never NULL, but prf->prf could be.
>
> If someone feeds SHA-224, which we don't support into CAVP, then it
> will dump core instead of stumbling on. The test facility shouldn't
> be doing that anyway :-)
>
> I'll change to code and get rid of the indirection.
This quickly got messy. So I renamed 'prf' to 'prf_entry' instead
(and tweaked that check).
Andrew
More information about the Swan-dev
mailing list