Fixed variable use before declaration
Noah Zalev committed
Jun 22, 2021 at 20:05 UTC
c39cd2bf39e69a968a7a671fc70e797a027caf71
1 file changed
+1
-1
letsencrypt.js
+1
-1
@@ -91,7 +91,7 @@ module.exports.CreateLetsEncrypt = function (parent) {
91
// Decode the certificate common and alt names
92
obj.certNames = [cert.subject.getField('CN').value];
93
var altNames = cert.getExtension('subjectAltName');
94
- if (altNames) { for (i = 0; i < altNames.altNames.length; i++) { var acn = altNames.altNames[i].value.toLowerCase(); if (obj.certNames.indexOf(acn) == -1) { obj.certNames.push(acn); } } }
94
+ if (altNames) { for (var i = 0; i < altNames.altNames.length; i++) { var acn = altNames.altNames[i].value.toLowerCase(); if (obj.certNames.indexOf(acn) == -1) { obj.certNames.push(acn); } } }
95
96
// Decode the certificate expire time
97
obj.certExpire = cert.validity.notAfter;