add some error checking for NSEC3 parameters
git-svn-id: https://svn.verisignlabs.com/jdnssec/tools/trunk@72 4cbd57fe-54e5-0310-bd9a-f30fe5ea5e6e
This commit is contained in:
parent
435acff6d0
commit
c95e1296ca
@ -266,6 +266,11 @@ public class SignZone
|
||||
if ((optstr = cli.getOptionValue('S')) != null)
|
||||
{
|
||||
salt = base16.fromString(optstr);
|
||||
if (salt == null && !optstr.equals("-"))
|
||||
{
|
||||
System.err.println("error: salt is not valid hexidecimal.");
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if ((optstr = cli.getOptionValue('R')) != null)
|
||||
@ -282,6 +287,11 @@ public class SignZone
|
||||
if ((optstr = cli.getOptionValue("iterations")) != null)
|
||||
{
|
||||
iterations = parseInt(optstr, iterations);
|
||||
if (iterations < 0 || iterations > 8388607)
|
||||
{
|
||||
System.err.println("error: iterations value is invalid");
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
String[] files = cli.getArgs();
|
||||
@ -341,7 +351,6 @@ public class SignZone
|
||||
out.flush();
|
||||
System.exit(64);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user