working, huzzah!

This commit is contained in:
AJ ONeal 2019-10-20 03:27:05 -06:00
förälder fd04a5070b
incheckning fd62408a9a
3 ändrade filer med 13 tillägg och 2 borttagningar

Visa fil

@ -214,6 +214,7 @@ C._check = function(db, args) {
certificate: args.certificate
};
return db.check(query).then(function(pems) {
console.log('[debug] has pems? (yes)', pems);
if (!pems) {
return null;
}
@ -234,6 +235,7 @@ C._check = function(db, args) {
return U._getKeypair(db, args.subject, query)
.then(function(keypair) {
console.log('[debug get keypair]', Object.keys(keypair));
pems.privkey = keypair.privateKeyPem;
return pems;
})

Visa fil

@ -310,7 +310,14 @@ G.create = function(gconf) {
challenges,
account,
args
);
).then(function(pems) {
if (!pems.privkey) {
throw new Error(
'missing private key, which is kinda important'
);
}
return pems;
});
});
});
});

Visa fil

@ -263,5 +263,7 @@ U._getOrCreateKeypair = function(db, subject, query, keyType, mustExist) {
};
U._getKeypair = function(db, subject, query) {
return U._getOrCreateKeypair(db, subject, query, '', true);
return U._getOrCreateKeypair(db, subject, query, '', true).then(function (result) {
return result.keypair;
});
};