Skip to content

Commit

Permalink
Fixed variable use before declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
nzalev committed Jun 23, 2021
1 parent 5552fb9 commit c39cd2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion letsencrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports.CreateLetsEncrypt = function (parent) {
// Decode the certificate common and alt names
obj.certNames = [cert.subject.getField('CN').value];
var altNames = cert.getExtension('subjectAltName');
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); } } }
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); } } }

// Decode the certificate expire time
obj.certExpire = cert.validity.notAfter;
Expand Down

0 comments on commit c39cd2b

Please sign in to comment.