changed RNG_REAL to RNG_TRUE
This commit is contained in:
@@ -212,7 +212,7 @@ bool test_rng()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!test_rng_quality(RNG_REAL))
|
||||
if (!test_rng_quality(RNG_TRUE))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ bool build_envelopedData(private_pkcs7_t *this, x509_t *cert,
|
||||
{
|
||||
rng_t *rng;
|
||||
|
||||
rng = lib->crypto->create_rng(lib->crypto, RNG_REAL);
|
||||
rng = lib->crypto->create_rng(lib->crypto, RNG_TRUE);
|
||||
rng->allocate_bytes(rng, crypter->get_key_size(crypter), &symmetricKey);
|
||||
DBG4(" symmetric encryption key: %B", &symmetricKey);
|
||||
rng->destroy(rng);
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#include "rng.h"
|
||||
|
||||
ENUM(rng_quality_names, RNG_WEAK, RNG_REAL,
|
||||
ENUM(rng_quality_names, RNG_WEAK, RNG_TRUE,
|
||||
"RNG_WEAK",
|
||||
"RNG_STRONG",
|
||||
"RNG_REAL",
|
||||
"RNG_TRUE",
|
||||
);
|
||||
|
||||
@@ -36,8 +36,8 @@ enum rng_quality_t {
|
||||
RNG_WEAK,
|
||||
/** stronger randomness, usable for session keys */
|
||||
RNG_STRONG,
|
||||
/** real random, key material */
|
||||
RNG_REAL,
|
||||
/** true random key material */
|
||||
RNG_TRUE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -141,10 +141,10 @@ static status_t compute_prime(private_gmp_rsa_private_key_t *this,
|
||||
rng_t *rng;
|
||||
chunk_t random_bytes;
|
||||
|
||||
rng = lib->crypto->create_rng(lib->crypto, RNG_REAL);
|
||||
rng = lib->crypto->create_rng(lib->crypto, RNG_TRUE);
|
||||
if (!rng)
|
||||
{
|
||||
DBG1("no RNG of quality %N found", rng_quality_names, RNG_REAL);
|
||||
DBG1("no RNG of quality %N found", rng_quality_names, RNG_TRUE);
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ plugin_t *plugin_create()
|
||||
|
||||
if (this->features & PADLOCK_RNG_ENABLED)
|
||||
{
|
||||
lib->crypto->add_rng(lib->crypto, RNG_REAL,
|
||||
lib->crypto->add_rng(lib->crypto, RNG_TRUE,
|
||||
(rng_constructor_t)padlock_rng_create);
|
||||
lib->crypto->add_rng(lib->crypto, RNG_STRONG,
|
||||
(rng_constructor_t)padlock_rng_create);
|
||||
|
||||
@@ -126,7 +126,7 @@ padlock_rng_t *padlock_rng_create(rng_quality_t quality)
|
||||
case RNG_STRONG:
|
||||
this->quality = PADLOCK_QF1;
|
||||
break;
|
||||
case RNG_REAL:
|
||||
case RNG_TRUE:
|
||||
this->quality = PADLOCK_QF3;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ plugin_t *plugin_create()
|
||||
|
||||
lib->crypto->add_rng(lib->crypto, RNG_STRONG,
|
||||
(rng_constructor_t)random_rng_create);
|
||||
lib->crypto->add_rng(lib->crypto, RNG_REAL,
|
||||
lib->crypto->add_rng(lib->crypto, RNG_TRUE,
|
||||
(rng_constructor_t)random_rng_create);
|
||||
|
||||
return &this->public.plugin;
|
||||
|
||||
@@ -114,7 +114,7 @@ random_rng_t *random_rng_create(rng_quality_t quality)
|
||||
this->public.rng.allocate_bytes = (void (*) (rng_t *, size_t, chunk_t*)) allocate_bytes;
|
||||
this->public.rng.destroy = (void (*) (rng_t *))destroy;
|
||||
|
||||
if (quality == RNG_REAL)
|
||||
if (quality == RNG_TRUE)
|
||||
{
|
||||
this->file = DEV_RANDOM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user