summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2017-09-15 21:14:34 +0200
committerRichard Levitte <levitte@openssl.org>2018-10-10 14:00:43 +0200
commitc2e33a05b1eb9dda988aebdeaa529973d7c22142 (patch)
treea1abf31a51c8d5ab6458b922d397f57a7a732f25
parentd90e128be6e584d319931c78cb8f8f68d17b6a34 (diff)
crypto/rand: fix some style nit's
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7378)
-rw-r--r--crypto/rand/drbg_ctr.c8
-rw-r--r--crypto/rand/drbg_lib.c12
-rw-r--r--crypto/rand/rand_win.c4
-rw-r--r--util/indent.pro4
4 files changed, 16 insertions, 12 deletions
diff --git a/crypto/rand/drbg_ctr.c b/crypto/rand/drbg_ctr.c
index 97378be445..0548237e7d 100644
--- a/crypto/rand/drbg_ctr.c
+++ b/crypto/rand/drbg_ctr.c
@@ -401,10 +401,10 @@ int drbg_ctr_init(RAND_DRBG *drbg)
if ((drbg->flags & RAND_DRBG_FLAG_CTR_NO_DF) == 0) {
/* df initialisation */
static const unsigned char df_key[32] = {
- 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
- 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
- 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
- 0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
};
if (ctr->ctx_df == NULL)
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index 10a17a9a5f..c59f3f0026 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -286,7 +286,7 @@ static RAND_DRBG *rand_drbg_new(int secure,
return drbg;
-err:
+ err:
if (drbg->secure)
OPENSSL_secure_free(drbg);
else
@@ -378,7 +378,7 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg,
entropylen = drbg->get_entropy(drbg, &entropy, min_entropy,
min_entropylen, max_entropylen, 0);
if (entropylen < min_entropylen
- || entropylen > max_entropylen) {
+ || entropylen > max_entropylen) {
RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, RAND_R_ERROR_RETRIEVING_ENTROPY);
goto end;
}
@@ -408,10 +408,10 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg,
drbg->reseed_prop_counter = drbg->parent->reseed_prop_counter;
}
-end:
+ end:
if (entropy != NULL && drbg->cleanup_entropy != NULL)
drbg->cleanup_entropy(drbg, entropy, entropylen);
- if (nonce != NULL && drbg->cleanup_nonce!= NULL )
+ if (nonce != NULL && drbg->cleanup_nonce != NULL)
drbg->cleanup_nonce(drbg, nonce, noncelen);
if (drbg->pool != NULL) {
if (drbg->state == DRBG_READY) {
@@ -504,7 +504,7 @@ int RAND_DRBG_reseed(RAND_DRBG *drbg,
drbg->max_entropylen,
prediction_resistance);
if (entropylen < drbg->min_entropylen
- || entropylen > drbg->max_entropylen) {
+ || entropylen > drbg->max_entropylen) {
RANDerr(RAND_F_RAND_DRBG_RESEED, RAND_R_ERROR_RETRIEVING_ENTROPY);
goto end;
}
@@ -522,7 +522,7 @@ int RAND_DRBG_reseed(RAND_DRBG *drbg,
drbg->reseed_prop_counter = drbg->parent->reseed_prop_counter;
}
-end:
+ end:
if (entropy != NULL && drbg->cleanup_entropy != NULL)
drbg->cleanup_entropy(drbg, entropy, entropylen);
if (drbg->state == DRBG_READY)
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 34c2a8b924..d2039eb226 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -67,7 +67,7 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool)
if (buffer != NULL) {
size_t bytes = 0;
if (BCryptGenRandom(NULL, buffer, bytes_needed,
- BCRYPT_USE_SYSTEM_PREFERRED_RNG) == STATUS_SUCCESS)
+ BCRYPT_USE_SYSTEM_PREFERRED_RNG) == STATUS_SUCCESS)
bytes = bytes_needed;
rand_pool_add_end(pool, bytes, 8 * bytes);
@@ -82,7 +82,7 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool)
size_t bytes = 0;
/* poll the CryptoAPI PRNG */
if (CryptAcquireContextW(&hProvider, NULL, NULL, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_SILENT) != 0) {
+ CRYPT_VERIFYCONTEXT | CRYPT_SILENT) != 0) {
if (CryptGenRandom(hProvider, bytes_needed, buffer) != 0)
bytes = bytes_needed;
diff --git a/util/indent.pro b/util/indent.pro
index 1802646053..443bddb1cc 100644
--- a/util/indent.pro
+++ b/util/indent.pro
@@ -637,3 +637,7 @@
-T ossl_uintmax_t
-T ossl_uintmax_t
-T CT_POLICY_EVAL_CTX
+-T RAND_DRBG
+-T RAND_DRBG_CTR
+-T RAND_POOL
+-T RAND_METHOD