workin' it
This commit is contained in:
parent
e651755417
commit
aec8958ca8
|
@ -6,13 +6,13 @@
|
|||
*/
|
||||
|
||||
'use strict';
|
||||
module.exports.create = function (deps) {
|
||||
var NOOP=function () {}, log=NOOP;
|
||||
var request=require('request');
|
||||
var importPemPrivateKey=deps.leCrypto.importPemPrivateKey;
|
||||
var Acme = deps.Acme;
|
||||
|
||||
var NOOP=function () {}, log=NOOP;
|
||||
var request=require('request');
|
||||
var cryptoUtil=require('./crypto-util');
|
||||
var Acme = require('./acme-client');
|
||||
|
||||
function registerNewAccount(options, cb) {
|
||||
function registerNewAccount(options, cb) {
|
||||
var state = {};
|
||||
|
||||
if (!options.accountPrivateKeyPem) {
|
||||
|
@ -32,7 +32,7 @@ function registerNewAccount(options, cb) {
|
|||
}
|
||||
|
||||
state.accountKeyPem=options.accountPrivateKeyPem;
|
||||
state.accountKeyPair=cryptoUtil.importPemPrivateKey(state.accountKeyPem);
|
||||
state.accountKeyPair=importPemPrivateKey(state.accountKeyPem);
|
||||
state.acme=new Acme(state.accountKeyPair);
|
||||
|
||||
register();
|
||||
|
@ -112,6 +112,7 @@ function registerNewAccount(options, cb) {
|
|||
log(text, err, info);
|
||||
cb(err || new Error(text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = registerNewAccount;
|
||||
return registerNewAccount;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue