Explicitly sign certificate with SHA256

This commit is contained in:
Michael B. Gale
2026-02-10 18:06:56 +00:00
parent 713a293090
commit e8f0116911
2 changed files with 250 additions and 250 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { ChildProcess, spawn } from "child_process";
import * as path from "path";
import * as core from "@actions/core";
import { pki } from "node-forge";
import { md, pki } from "node-forge";
import * as actionsUtil from "./actions-util";
import { getGitHubVersion } from "./api-client";
@@ -90,7 +90,7 @@ function generateCertificateAuthority(): CertificateAuthority {
{ name: "basicConstraints", cA: true },
{ name: "keyUsage", keyCertSign: true, cRLSign: true },
]);
cert.sign(keys.privateKey);
cert.sign(keys.privateKey, md.sha256.create());
const pem = pki.certificateToPem(cert);
const key = pki.privateKeyToPem(keys.privateKey);