From: Tobias Brunner Date: Fri, 28 Sep 2012 17:13:40 +0000 (+0200) Subject: Fixed RNG crypto tester X-Git-Tag: 5.0.1~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91a8dc2decf723ef2ad1be18c86df5bad8ee264c;p=thirdparty%2Fstrongswan.git Fixed RNG crypto tester --- diff --git a/src/libstrongswan/crypto/crypto_tester.c b/src/libstrongswan/crypto/crypto_tester.c index a481612c6f..01e84a133f 100644 --- a/src/libstrongswan/crypto/crypto_tester.c +++ b/src/libstrongswan/crypto/crypto_tester.c @@ -1075,17 +1075,15 @@ METHOD(crypto_tester_t, test_rng, bool, { goto failure; } - if (!failed) - { /* write bytes into existing buffer */ - memset(data.ptr, 0, data.len); - if (!rng->get_bytes(rng, vector->len, data.ptr)) - { - goto failure; - } - if (!vector->test(vector->user, data)) - { - goto failure; - } + /* write bytes into existing buffer */ + memset(data.ptr, 0, data.len); + if (!rng->get_bytes(rng, vector->len, data.ptr)) + { + goto failure; + } + if (!vector->test(vector->user, data)) + { + goto failure; } failed = FALSE;