This commit is contained in:
AJ ONeal 2015-12-15 13:23:30 +00:00
parent 29d1b614b8
commit 24c9884965
1 changed files with 6 additions and 6 deletions

View File

@ -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
});
}