From 24c9884965166528f2d90f6296e98a9b46967d4c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 15 Dec 2015 13:23:30 +0000 Subject: [PATCH] updates --- lib/client.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/client.js b/lib/client.js index 257c948..efc3c58 100644 --- a/lib/client.js +++ b/lib/client.js @@ -123,7 +123,7 @@ function registerNewAccount(options, cb) { } state.accountKeyPem=options.accountPrivateKeyPem; - state.accountKeyPair=cryptoUtil.importPemPrivateKey(state.accountKeyPEM); + state.accountKeyPair=cryptoUtil.importPemPrivateKey(state.accountKeyPem); state.acme=new Acme(state.accountKeyPair); register(); @@ -139,7 +139,7 @@ function registerNewAccount(options, cb) { var links; if (err || Math.floor(res.statusCode/100)!==2) { - return handleErr(err, 'Registration request failed'); + return handleErr(err, 'Registration request failed: ' + res.body.toString('utf8')); } links=parseLink(res.headers['link']); @@ -229,10 +229,10 @@ function getCert(options, cb) { state.domains = options.domains.slice(0); // copy array try { state.accountKeyPem=options.accountPrivateKeyPem; - state.accountKeyPair=cryptoUtil.importPemPrivateKey(state.accountKeyPEM); + state.accountKeyPair=cryptoUtil.importPemPrivateKey(state.accountKeyPem); state.acme=new Acme(state.accountKeyPair); - state.certPrivateKeyPEM=options.domainPrivateKeyPem; - state.certPrivateKey=cryptoUtil.importPemPrivateKey(state.certPrivateKeyPEM); + state.certPrivateKeyPem=options.domainPrivateKeyPem; + state.certPrivateKey=cryptoUtil.importPemPrivateKey(state.certPrivateKeyPem); } catch(err) { return handleErr(err, 'Failed to parse privateKey'); } @@ -412,7 +412,7 @@ function getCert(options, cb) { cb(null, { cert: cert - , key: state.certPrivateKeyPEM + , key: state.certPrivateKeyPem , ca: state.caCert }); }