backwards compat
This commit is contained in:
parent
36acd623ca
commit
e8acedd6d7
|
@ -11,9 +11,14 @@ module.exports.create = function (deps) {
|
||||||
var NOOP=function () {};
|
var NOOP=function () {};
|
||||||
var log=NOOP;
|
var log=NOOP;
|
||||||
var request=require('request');
|
var request=require('request');
|
||||||
var generateSignature=deps.RSA.signJws;
|
var RSA = deps.RSA;
|
||||||
|
var generateSignature = RSA.signJws;
|
||||||
|
|
||||||
function Acme(keypair) {
|
function Acme(keypair) {
|
||||||
|
if ('string' === typeof keypair) {
|
||||||
|
// backwards compat
|
||||||
|
keypair = RSA.import({ privateKeyPem: keypair });
|
||||||
|
}
|
||||||
this.keypair = keypair;
|
this.keypair = keypair;
|
||||||
this.nonces=[];
|
this.nonces=[];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue