diff --git a/lib/acme-client.js b/lib/acme-client.js index 5dd199f..1bb3794 100644 --- a/lib/acme-client.js +++ b/lib/acme-client.js @@ -11,9 +11,14 @@ module.exports.create = function (deps) { var NOOP=function () {}; var log=NOOP; var request=require('request'); - var generateSignature=deps.RSA.signJws; + var RSA = deps.RSA; + var generateSignature = RSA.signJws; function Acme(keypair) { + if ('string' === typeof keypair) { + // backwards compat + keypair = RSA.import({ privateKeyPem: keypair }); + } this.keypair = keypair; this.nonces=[]; }