diff --git a/action.yml b/action.yml index 7919282..5906e95 100644 --- a/action.yml +++ b/action.yml @@ -24,6 +24,10 @@ inputs: description: "The URL of the RFC 3161 time stamp server." required: false default: "" + timestamp_digest_algorithm: + description: "Specifies the digest algorithm to use for creating time stamps." + required: false + default: "" description: description: "Specifies a description of the signed content." required: false diff --git a/src/index.ts b/src/index.ts index a944b99..a1255d9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,8 @@ async function run() { file, certificate, timestampUrl: core.getInput('timestamp_url') || undefined, + timestampRfc3161Url: core.getInput('timestamp_rfc3161_url') || undefined, + timestampDigestAlgorithm: core.getInput('timestamp_digest_algorithm') || undefined, description: core.getInput('description') || undefined, descriptionUrl: core.getInput('description_url') || undefined, additionalCertificates: core.getInput('additional_certificate') || undefined, diff --git a/src/utils.ts b/src/utils.ts index d4f068f..c648409 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -82,6 +82,7 @@ export interface SignOptions { certificate: string; timestampUrl?: string; timestampRfc3161Url?: string; + timestampDigestAlgorithm?: string; description?: string; descriptionUrl?: string; additionalCertificates?: string; @@ -99,6 +100,9 @@ export async function sign(options: SignOptions) { if (options.timestampRfc3161Url) { args['tr'] = options.timestampRfc3161Url; } + if (options.timestampDigestAlgorithm) { + args['td'] = options.timestampDigestAlgorithm; + } if (options.description) { args['d'] = options.description; }