mirror of
https://github.com/cderche/greenlock-storage-s3
synced 2025-02-22 06:08:04 +00:00
make cert optional in get/set keypair
This commit is contained in:
parent
7c350ff286
commit
83819b5901
@ -6,7 +6,7 @@ const fileNames = require("../fileNames");
|
||||
module.exports.checkKeypair = (opts, options) => {
|
||||
console.log("certificates.checkKeypair for", opts.subject);
|
||||
|
||||
let id = opts.certificate.kid || opts.certificate.id || opts.subject;
|
||||
let id = (opts.certificate && (opts.certificate.kid || opts.certificate.id)) || opts.subject;
|
||||
|
||||
let pemKeyPath = pathHelper.certificatesPath(options, id, fileNames.privkey.pem);
|
||||
// let jwkKeyPath = pathHelper.certificatesPath(options, id, fileNames.privkey.jwk);
|
||||
|
@ -4,7 +4,7 @@ const pathHelper = require("../pathHelper");
|
||||
const fileNames = require("../fileNames");
|
||||
|
||||
module.exports.setKeypair = (opts, options) => {
|
||||
let id = opts.certificate.kid || opts.certificate.id || opts.subject;
|
||||
let id = (opts.certificate && (opts.certificate.kid || opts.certificate.id)) || opts.subject;
|
||||
console.log("certificates.setKeypair for", id);
|
||||
|
||||
let pemKeyPath = pathHelper.certificatesPath(options, id, fileNames.privkey.pem);
|
||||
|
Loading…
x
Reference in New Issue
Block a user