revert hashAlgorithm to fix peform signature

revert commit 43c16d02f9
This commit is contained in:
Simon Smith 2023-12-18 12:11:52 +00:00 committed by GitHub
parent e488a002da
commit a17fd2f268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,8 +85,8 @@ module.exports.CertificateOperations = function (parent) {
var signkey = null, certChain = null, hashAlgo = null, certIndex = null; var signkey = null, certChain = null, hashAlgo = null, certIndex = null;
for (var i in domain.amtacmactivation.certs) { for (var i in domain.amtacmactivation.certs) {
const certEntry = domain.amtacmactivation.certs[i]; const certEntry = domain.amtacmactivation.certs[i];
if ((certEntry.sha256 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = certEntry.hashAlgorithm; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; } if ((certEntry.sha256 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = 'sha256'; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; }
if ((certEntry.sha1 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = certEntry.hashAlgorithm; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; } if ((certEntry.sha1 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = 'sha1'; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; }
} }
if (signkey == null) return { 'action': 'acmactivate', 'error': 2, 'errorText': "Can't sign ACM request, no signing certificate found." }; // Did not find a match. if (signkey == null) return { 'action': 'acmactivate', 'error': 2, 'errorText': "Can't sign ACM request, no signing certificate found." }; // Did not find a match.