rename privateKey -> keypair

This commit is contained in:
AJ ONeal 2016-08-01 20:25:46 -04:00
parent 3bab5857dd
commit e52f043cfe
1 changed files with 3 additions and 3 deletions

View File

@ -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);