From cc0de05f5e190230298d3cdd1854f551e8c9d538 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 5 Aug 2016 09:02:51 -0600 Subject: [PATCH] default rsaKeySize to 2048 and challengeType to http-01 --- lib/core.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core.js b/lib/core.js index 75f7dcd..37469ba 100644 --- a/lib/core.js +++ b/lib/core.js @@ -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 //