crypto: DRBG return code handling inside testmgr.c
Subsystems (2)
PATCH 1/1 crypto: DRBG return code handling inside testmgr.c
Hi Herbert,
I just fixed a small DRBG return code issue inside testmgr.c directly related to the RNG changes Stephan submitted.
Regards,
Alex
Signature · 4 lines
Alexander Bergmann <[email protected]>, Security Engineer, SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
From 4348e8ae9361284c9bdd591a4e5988d575daa736 Mon Sep 17 00:00:00 2001
From: Alexander Bergmann <[email protected]>
Date: Tue, 10 Mar 2015 16:05:22 +0100
Subject: [PATCH] crypto: DRBG return code handling inside testmgr.c
This is a follow-up fix for the "RNGs must return 0 in success case" changes. The drbg_cavs_test function has to handle the DRBG return codes correctly as 0 is not an error anymore.
--- crypto/testmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
crypto/testmgr.c +2 -2
@@ -1759,7 +1759,7 @@ static int drbg_cavs_test(struct drbg_testvec *test, int pr, ret =crypto_drbg_get_bytes_addtl (drng, buf, test->expectedlen, &addtl); } -if (ret <=0 ) { +if (ret <0 ) {printk (KERN_ERR "alg: drbg: could not obtain random data for " "driver %s\n" , driver); goto outbuf;
@@ -1774,7 +1774,7 @@ static int drbg_cavs_test(struct drbg_testvec *test, int pr, ret =crypto_drbg_get_bytes_addtl (drng, buf, test->expectedlen, &addtl); } -if (ret <=0 ) { +if (ret <0 ) {printk (KERN_ERR "alg: drbg: could not obtain random data for " "driver %s\n" , driver); goto outbuf;
Signature · 1 line
1.8.1.4
Am Dienstag, 10. März 2015, 16:14:17 schrieb Alexander Bergmann:
Hi Alexander,
Quoted 4 lines
Hi Herbert,
I just fixed a small DRBG return code issue inside
testmgr.cdirectly related to the RNG changes Stephan submitted.
Can you please resend it as an inline patch and copy linux-crypto too?
Also, there is a similar error in test_cprng -- may I ask you to fix that one too?
Quoted 4 lines
Regards,
Alex
Signature · 2 lines
Ciao Stephan
Herbert Xu
maintainerQuoted 4 lines · Alexander Bergmann
Hi Herbert,
I just fixed a small DRBG return code issue inside
testmgr.cdirectly related to the RNG changes Stephan submitted.
Thanks Alex. Could you resend this via [email protected] so that patchworks can pick it up?
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt