diff --git a/ct/step-ca.sh b/ct/step-ca.sh index 738ca6d1d..83e0dca13 100644 --- a/ct/step-ca.sh +++ b/ct/step-ca.sh @@ -37,6 +37,22 @@ function update_script() { rm -f "$STEPBIN" cp -f "$(which step-cli)" "$STEPBIN" + # Patch for leaf_data.tpl - Issue: #14810 + sed -i \ + -e 's/\[//' \ + -e 's/\]//' \ + "$STEPPATH/templates/x509/leaf_data.tpl" + + # Patch for provisioners templateData - Issue: #14810 + step ca provisioner list | jq -c '.[] | select(.options.x509.templateData != null) | .name' > /tmp/provisioner_names.json + for i in $(cat /tmp/provisioner_names.json); do + prov=`echo $i | tr -d '"'` + echo + echo "Updating provisioner $prov ..." + $STD step ca provisioner update $prov --x509-template-data=$STEPPATH/templates/x509/leaf_data.tpl + done + rm /tmp/provisioner_names.json + $STD systemctl restart step-ca msg_ok "Updated step-ca and step-cli" diff --git a/install/step-ca-install.sh b/install/step-ca-install.sh index 9f0c3073b..2a13fadfe 100644 --- a/install/step-ca-install.sh +++ b/install/step-ca-install.sh @@ -183,8 +183,8 @@ cat <"$X509LeafTemplateData" "country": "${PKICountry}", "organization": "${PKIName}", "organizationalUnit": "${PKIOrganizationalUnit}", - "issuingCertificateURL": ["https://${FQDN}${LISTENER}/intermediates.pem"], - "crlDistributionPoints": ["https://${FQDN}${LISTENER}/crl"] + "issuingCertificateURL": "https://${FQDN}${LISTENER}/intermediates.pem", + "crlDistributionPoints": "https://${FQDN}${LISTENER}/crl" } EOF