revert hashAlgorithm to fix peform signature
revert commit 43c16d02f9c5538c1dbc9459eaeff5a4a250d8bd
Simon Smith committed
Dec 18, 2023 at 12:11 UTC
a17fd2f26872c83e6a1ec1a2ac350efdf67552d5
1 file changed
+2
-2
certoperations.js
+2
-2
@@ -85,8 +85,8 @@ module.exports.CertificateOperations = function (parent) {
85
var signkey = null, certChain = null, hashAlgo = null, certIndex = null;
86
for (var i in domain.amtacmactivation.certs) {
87
const certEntry = domain.amtacmactivation.certs[i];
88
- if ((certEntry.sha256 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = certEntry.hashAlgorithm; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; }
89
- if ((certEntry.sha1 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = certEntry.hashAlgorithm; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; }
88
+ if ((certEntry.sha256 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = 'sha256'; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; }
89
+ if ((certEntry.sha1 == request.hash) && ((certEntry.cn == '*') || checkAcmActivationCertName(certEntry.cn, request.fqdn))) { hashAlgo = 'sha1'; signkey = certEntry.key; certChain = certEntry.certs; certIndex = i; break; }
90
}
91
if (signkey == null) return { 'action': 'acmactivate', 'error': 2, 'errorText': "Can't sign ACM request, no signing certificate found." }; // Did not find a match.
92