rename privateKey -> keypair
This commit is contained in:
parent
3bab5857dd
commit
e52f043cfe
|
@ -13,8 +13,8 @@ module.exports.create = function (deps) {
|
||||||
var request=require('request');
|
var request=require('request');
|
||||||
var generateSignature=deps.RSA.signJws;
|
var generateSignature=deps.RSA.signJws;
|
||||||
|
|
||||||
function Acme(privateKey) {
|
function Acme(keypair) {
|
||||||
this.privateKey=privateKey;
|
this.keypair;
|
||||||
this.nonces=[];
|
this.nonces=[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ module.exports.create = function (deps) {
|
||||||
log('Using nonce: '+this.nonces[0]);
|
log('Using nonce: '+this.nonces[0]);
|
||||||
payload=JSON.stringify(body, null, 2);
|
payload=JSON.stringify(body, null, 2);
|
||||||
jws=generateSignature(
|
jws=generateSignature(
|
||||||
this.privateKey, new Buffer(payload), this.nonces.shift()
|
this.keypair, new Buffer(payload), this.nonces.shift()
|
||||||
);
|
);
|
||||||
signed=JSON.stringify(jws, null, 2);
|
signed=JSON.stringify(jws, null, 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue