use SAN only when requested

This commit is contained in:
AJ ONeal 2018-05-04 10:45:22 +00:00
parent 3e2b516f37
commit 01cdc0e91b
1 changed files with 24 additions and 19 deletions

5
csr.js
View File

@ -127,6 +127,7 @@ function createPkcs10Csr(domainKeypair, domains) {
]
});
function addSan() {
var altNames = new org.pkijs.simpl.GENERAL_NAMES({
names: [
new org.pkijs.simpl.GENERAL_NAME({
@ -148,7 +149,11 @@ function createPkcs10Csr(domainKeypair, domains) {
});
pkcs10_simpl.attributes.push(attribute);
}
if (domains.length) {
addSan();
}
});
// #endregion