add large exponent option to the key generation code

git-svn-id: https://svn.verisignlabs.com/jdnssec/tools/trunk@87 4cbd57fe-54e5-0310-bd9a-f30fe5ea5e6e
This commit is contained in:
David Blacka
2006-09-10 16:48:21 +00:00
parent 08b2c4bc32
commit 3bd38f9fbc
4 changed files with 51 additions and 10 deletions

View File

@@ -54,6 +54,7 @@ public class KeyGen
private Options opts;
public int algorithm = 5;
public int keylength = 1024;
public boolean useLargeE = false;
public String outputfile = null;
public File keydir = null;
public boolean zoneKey = true;
@@ -81,7 +82,8 @@ public class KeyGen
"kskflag",
false,
"Key is a key-signing-key (sets the SEP flag).");
opts.addOption("e", "large-exponent", false, "Use large RSA exponent");
// Argument options
OptionBuilder.hasArg();
OptionBuilder.withLongOpt("nametype");
@@ -164,6 +166,8 @@ public class KeyGen
if (cli.hasOption('k')) kskFlag = true;
if (cli.hasOption('e')) useLargeE = true;
outputfile = cli.getOptionValue('f');
if ((optstr = cli.getOptionValue('d')) != null)
@@ -307,11 +311,12 @@ public class KeyGen
+ ", length = " + state.keylength + ")");
DnsKeyPair pair = signer.generateKey(owner_name,
state.ttl,
DClass.IN,
state.algorithm,
flags,
state.keylength);
state.ttl,
DClass.IN,
state.algorithm,
flags,
state.keylength,
state.useLargeE);
if (state.outputfile != null)
{