default rsaKeySize to 2048 and challengeType to http-01

This commit is contained in:
AJ ONeal 2016-08-05 09:02:51 -06:00
parent 4a389606b0
commit cc0de05f5e
1 changed files with 5 additions and 3 deletions

View File

@ -85,7 +85,7 @@ function writeRenewalConfig(args) {
, http01Port: args.http01Port
, keyPath: args.domainPrivateKeyPath || args.privkeyPath
, rsaKeySize: args.rsaKeySize
, rsaKeySize: args.rsaKeySize || 2048
, checkpoints: pyobj.checkpoints
/* // TODO XXX what's the deal with these? they don't make sense
// are they just old junk? or do they have a meaning that I don't know about?
@ -151,7 +151,7 @@ function getOrCreateRenewal(args) {
//, workDir: args.workDir
//, logsDir: args.logsDir
args.rsaKeySize = args.rsaKeySize || pyobj.rsaKeySize;
args.rsaKeySize = args.rsaKeySize || pyobj.rsaKeySize || 2048;
args.http01Port = args.http01Port || pyobj.http01Port;
args.domainKeyPath = args.domainPrivateKeyPath || args.domainKeyPath || args.keyPath || pyobj.keyPath;
@ -270,7 +270,7 @@ function getCertificateAsync(args, defaults, handlers) {
promise = fs.readFileAsync(args.domainKeyPath, 'ascii').then(function (pem) {
return RSA.import({ privateKeyPem: pem });
}, function (/*err*/) {
return RSA.generateKeypairAsync(args.rsaKeySize, 65537, keypairOpts).then(function (keypair) {
return RSA.generateKeypairAsync(args.rsaKeySize || 2048, 65537, keypairOpts).then(function (keypair) {
return mkdirpAsync(path.dirname(args.domainKeyPath)).then(function () {
return fs.writeFileAsync(args.domainKeyPath, keypair.privateKeyPem, 'ascii').then(function () {
return keypair;
@ -295,6 +295,8 @@ function getCertificateAsync(args, defaults, handlers) {
, domainKeypair: domainKeypair
, domains: args.domains
, challengeType: args.challengeType || 'http-01'
//
// IMPORTANT
//