From 1bdc3fd29a6f615a2c1361613c36768e478c0cc2 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Wed, 20 Oct 1999 19:08:57 +0000 Subject: [PATCH] dst_random -> dst_random_get --- bin/tests/dst/dst_test.c | 2 +- bin/tests/dst/t_dst.c | 4 ++-- lib/dns/sec/dst/bsafe_link.c | 4 ++-- lib/dns/sec/dst/dst_api.c | 6 +++--- lib/dns/sec/dst/hmac_link.c | 4 ++-- lib/dns/sec/dst/include/dst/dst.h | 2 +- lib/dns/sec/dst/openssl_link.c | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/tests/dst/dst_test.c b/bin/tests/dst/dst_test.c index 013e2df1b8..a87a57eed6 100644 --- a/bin/tests/dst/dst_test.c +++ b/bin/tests/dst/dst_test.c @@ -102,7 +102,7 @@ get_random() { unsigned int i; isc_buffer_init(&databuf, data, sizeof data, ISC_BUFFERTYPE_BINARY); - ret = dst_random(sizeof(data), &databuf); + ret = dst_random_get(sizeof(data), &databuf); printf("random() returned: %s\n", dst_result_totext(ret)); for (i = 0; i < sizeof data; i++) printf("%02x ", data[i]); diff --git a/bin/tests/dst/t_dst.c b/bin/tests/dst/t_dst.c index e5bcea14fb..330e302cad 100644 --- a/bin/tests/dst/t_dst.c +++ b/bin/tests/dst/t_dst.c @@ -209,7 +209,7 @@ get_random(int *nfails) { unsigned int i; isc_buffer_init(&databuf1, data1, sizeof(data1), ISC_BUFFERTYPE_BINARY); - ret = dst_random(sizeof(data1), &databuf1); + ret = dst_random_get(sizeof(data1), &databuf1); if (ret != DST_R_SUCCESS) { t_info("random() returned: %s\n", dst_result_totext(ret)); ++*nfails; @@ -217,7 +217,7 @@ get_random(int *nfails) { } isc_buffer_init(&databuf2, data2, sizeof(data2), ISC_BUFFERTYPE_BINARY); - ret = dst_random(sizeof(data2), &databuf2); + ret = dst_random_get(sizeof(data2), &databuf2); if (ret != DST_R_SUCCESS) { t_info("random() returned: %s\n", dst_result_totext(ret)); ++*nfails; diff --git a/lib/dns/sec/dst/bsafe_link.c b/lib/dns/sec/dst/bsafe_link.c index dd8d34bfbd..0e81e40d87 100644 --- a/lib/dns/sec/dst/bsafe_link.c +++ b/lib/dns/sec/dst/bsafe_link.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: bsafe_link.c,v 1.8 1999/10/08 22:14:24 tale Exp $ + * $Id: bsafe_link.c,v 1.9 1999/10/20 19:08:56 bwelling Exp $ */ #include @@ -864,7 +864,7 @@ dst_bsafe_generate(dst_key_t *key, int exp, isc_mem_t *mctx) { isc_buffer_init(&rand, randomSeed, sizeof(randomSeed), ISC_BUFFERTYPE_BINARY); - ret = dst_random(sizeof(randomSeed), &rand); + ret = dst_random_get(sizeof(randomSeed), &rand); if (ret != DST_R_SUCCESS) goto fail; diff --git a/lib/dns/sec/dst/dst_api.c b/lib/dns/sec/dst/dst_api.c index 1d89e0c9ad..3511de5a01 100644 --- a/lib/dns/sec/dst/dst_api.c +++ b/lib/dns/sec/dst/dst_api.c @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_api.c,v 1.15 1999/10/18 21:35:46 bwelling Exp $ + * $Id: dst_api.c,v 1.16 1999/10/20 19:08:57 bwelling Exp $ */ #include @@ -773,7 +773,7 @@ dst_secret_size(const dst_key_t *key) { } /* - * dst_random + * dst_random_get * a random number generator that can generate different levels of * randomness * Parameters @@ -785,7 +785,7 @@ dst_secret_size(const dst_key_t *key) { * !ISC_R_SUCCESS Failure */ dst_result_t -dst_random(const unsigned int wanted, isc_buffer_t *target) { +dst_random_get(const unsigned int wanted, isc_buffer_t *target) { isc_region_t r; RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS); diff --git a/lib/dns/sec/dst/hmac_link.c b/lib/dns/sec/dst/hmac_link.c index 47bcde6a7f..7fb8c1efb7 100644 --- a/lib/dns/sec/dst/hmac_link.c +++ b/lib/dns/sec/dst/hmac_link.c @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: hmac_link.c,v 1.10 1999/10/18 21:35:46 bwelling Exp $ + * $Id: hmac_link.c,v 1.11 1999/10/20 19:08:57 bwelling Exp $ */ #include @@ -455,7 +455,7 @@ dst_hmacmd5_generate(dst_key_t *key, int unused, isc_mem_t *mctx) { memset(data, 0, HMAC_LEN); isc_buffer_init(&b, data, sizeof(data), ISC_BUFFERTYPE_BINARY); - ret = dst_random(bytes, &b); + ret = dst_random_get(bytes, &b); if (ret != DST_R_SUCCESS) return (ret); diff --git a/lib/dns/sec/dst/include/dst/dst.h b/lib/dns/sec/dst/include/dst/dst.h index 99e057d800..64d4baa9f6 100644 --- a/lib/dns/sec/dst/include/dst/dst.h +++ b/lib/dns/sec/dst/include/dst/dst.h @@ -323,7 +323,7 @@ dst_secret_size(const dst_key_t *key); * be advanced. */ dst_result_t -dst_random(const unsigned int wanted, isc_buffer_t *data); +dst_random_get(const unsigned int wanted, isc_buffer_t *data); ISC_LANG_ENDDECLS diff --git a/lib/dns/sec/dst/openssl_link.c b/lib/dns/sec/dst/openssl_link.c index 78c77a5276..7b42137189 100644 --- a/lib/dns/sec/dst/openssl_link.c +++ b/lib/dns/sec/dst/openssl_link.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: openssl_link.c,v 1.9 1999/10/08 13:08:56 bwelling Exp $ + * $Id: openssl_link.c,v 1.10 1999/10/20 19:08:57 bwelling Exp $ */ #include @@ -553,7 +553,7 @@ dst_openssl_generate(dst_key_t *key, int unused, isc_mem_t *mctx) { isc_buffer_init(&rand, rand_array, sizeof(rand_array), ISC_BUFFERTYPE_BINARY); - ret = dst_random(SHA_DIGEST_LENGTH, &rand); + ret = dst_random_get(SHA_DIGEST_LENGTH, &rand); if (ret != DST_R_SUCCESS) return (ret);