summaryrefslogtreecommitdiff
path: root/bin/tools
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tools')
-rw-r--r--bin/tools/genrandom.84
-rw-r--r--bin/tools/genrandom.docbook4
-rw-r--r--bin/tools/genrandom.html4
-rw-r--r--bin/tools/nsec3hash.c10
4 files changed, 13 insertions, 9 deletions
diff --git a/bin/tools/genrandom.8 b/bin/tools/genrandom.8
index 6c49a070..7fd82131 100644
--- a/bin/tools/genrandom.8
+++ b/bin/tools/genrandom.8
@@ -12,7 +12,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $Id: genrandom.8,v 1.4 2009/03/03 01:12:26 tbox Exp $
+.\" $Id: genrandom.8,v 1.5 2009/09/19 01:14:52 tbox Exp $
.\"
.hy 0
.ad l
@@ -36,7 +36,7 @@ genrandom \- generate a file containing random data
.SH "DESCRIPTION"
.PP
\fBgenrandom\fR
-generates a file containing a specified quantity of psuedo\-random data, which can be used as a source of entropy for other commands on systems with no random device.
+generates a file containing a specified quantity of pseudo\-random data, which can be used as a source of entropy for other commands on systems with no random device.
.SH "ARGUMENTS"
.PP
size
diff --git a/bin/tools/genrandom.docbook b/bin/tools/genrandom.docbook
index f17dfd7a..581c9367 100644
--- a/bin/tools/genrandom.docbook
+++ b/bin/tools/genrandom.docbook
@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: genrandom.docbook,v 1.3 2009/03/02 23:47:43 tbox Exp $ -->
+<!-- $Id: genrandom.docbook,v 1.4 2009/09/18 13:14:47 fdupont Exp $ -->
<refentry id="man.genrandom">
<refentryinfo>
<date>Feb 19, 2009</date>
@@ -53,7 +53,7 @@
<title>DESCRIPTION</title>
<para>
<command>genrandom</command>
- generates a file containing a specified quantity of psuedo-random
+ generates a file containing a specified quantity of pseudo-random
data, which can be used as a source of entropy for other commands
on systems with no random device.
</para>
diff --git a/bin/tools/genrandom.html b/bin/tools/genrandom.html
index 32fbb841..d6fe8130 100644
--- a/bin/tools/genrandom.html
+++ b/bin/tools/genrandom.html
@@ -14,7 +14,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: genrandom.html,v 1.4 2009/03/03 01:12:26 tbox Exp $ -->
+<!-- $Id: genrandom.html,v 1.5 2009/09/19 01:14:52 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -35,7 +35,7 @@
<a name="id2543351"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">genrandom</strong></span>
- generates a file containing a specified quantity of psuedo-random
+ generates a file containing a specified quantity of pseudo-random
data, which can be used as a source of entropy for other commands
on systems with no random device.
</p>
diff --git a/bin/tools/nsec3hash.c b/bin/tools/nsec3hash.c
index 65bddf6f..f8ad799b 100644
--- a/bin/tools/nsec3hash.c
+++ b/bin/tools/nsec3hash.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3hash.c,v 1.4 2009/03/07 23:47:45 tbox Exp $ */
+/* $Id: nsec3hash.c,v 1.6 2009/10/06 21:20:44 each Exp $ */
#include <config.h>
@@ -32,10 +32,14 @@
#include <dns/fixedname.h>
#include <dns/name.h>
+#include <dns/nsec3.h>
#include <dns/types.h>
const char *program = "nsec3hash";
+ISC_PLATFORM_NORETURN_PRE static void
+fatal(const char *format, ...) ISC_PLATFORM_NORETURN_POST;
+
static void
fatal(const char *format, ...) {
va_list args;
@@ -67,7 +71,7 @@ main(int argc, char **argv) {
isc_region_t region;
isc_result_t result;
unsigned char hash[NSEC3_MAX_HASH_LENGTH];
- unsigned char salt[255];
+ unsigned char salt[DNS_NSEC3_SALTSIZE];
unsigned char text[1024];
unsigned int hash_alg;
unsigned int length;
@@ -85,7 +89,7 @@ main(int argc, char **argv) {
result = isc_hex_decodestring(argv[1], &buffer);
check_result(result, "isc_hex_decodestring(salt)");
salt_length = isc_buffer_usedlength(&buffer);
- if (salt_length > 255U)
+ if (salt_length > DNS_NSEC3_SALTSIZE)
fatal("salt too long");
}
hash_alg = atoi(argv[2]);