X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Frandom.c;h=25c8a2c88e3e95fbfd8d16055b6ed6abd45e5ea7;hb=433758e4cbcffef5557692134afec35a9acd0e6a;hp=870ab64f6c23f16fd66bdb13109ed670e2e68523;hpb=dc371d7174064c2070e0d725d643d5dc712a5b1f;p=platform%2Fupstream%2Fcryptsetup.git diff --git a/lib/random.c b/lib/random.c index 870ab64..25c8a2c 100644 --- a/lib/random.c +++ b/lib/random.c @@ -5,7 +5,8 @@ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,10 +23,10 @@ #include #include #include +#include #include "libcryptsetup.h" #include "internal.h" -#include "crypto_backend.h" static int random_initialised = 0; @@ -179,13 +180,13 @@ int crypt_random_get(struct crypt_device *ctx, char *buf, size_t len, int qualit break; case CRYPT_RND_SALT: if (crypt_fips_mode()) - status = crypt_backend_fips_rng(buf, len, quality); + status = crypt_backend_rng(buf, len, quality, 1); else status = _get_urandom(ctx, buf, len); break; case CRYPT_RND_KEY: if (crypt_fips_mode()) { - status = crypt_backend_fips_rng(buf, len, quality); + status = crypt_backend_rng(buf, len, quality, 1); break; } rng_type = ctx ? crypt_get_rng_type(ctx) :