disambiguate

This commit is contained in:
AJ ONeal 2016-08-01 21:16:25 -04:00
parent e8acedd6d7
commit 2f607314b9
1 changed files with 11 additions and 6 deletions

View File

@ -311,7 +311,7 @@ module.exports.create = function (deps) {
return handleErr(err, 'Failed to fetch issuer certificate');
}
state.caCert=certBufferToPem(body);
state.caCertPem=certBufferToPem(body);
log('Requesting issuer certificate: done');
done();
});
@ -319,10 +319,11 @@ module.exports.create = function (deps) {
}
function done() {
var cert;
var certPem;
var privkeyPem;
try {
cert = certBufferToPem(state.certificate);
certPem = certBufferToPem(state.certificate);
} catch(e) {
console.error(e.stack);
//cb(new Error("Could not write output files. Please check permissions!"));
@ -330,10 +331,14 @@ module.exports.create = function (deps) {
return;
}
privkeyPem = RSA.exportPrivateKeyPem(state.certKeypair);
cb(null, {
cert: cert
, key: RSA.exportPrivateKeyPem(state.certKeypair)
, ca: state.caCert
cert: certPem
// TODO nix key
, key: privkeyPem
, privkey: privkeyPem
//, keypair: state.certKeypair // domainKeypair
, ca: state.caCertPem
});
}