From a096aa8a33887c729c1116ddd6d975c20515a272 Mon Sep 17 00:00:00 2001 From: olszomal Date: Mon, 31 Jul 2023 09:41:56 +0200 Subject: [PATCH] Set signing digest to generate RFC3161 response --- osslsigncode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osslsigncode.c b/osslsigncode.c index 84104b5..d448c61 100644 --- a/osslsigncode.c +++ b/osslsigncode.c @@ -834,6 +834,10 @@ static TS_RESP *get_rfc3161_response(FILE_FORMAT_CTX *ctx, X509 *signer_cert, if (!TS_RESP_CTX_add_md(resp_ctx, ctx->options->md)) { goto out; } + /* signing digest to use */ + if (!TS_RESP_CTX_set_signer_digest(resp_ctx, ctx->options->md)) { + goto out; + } /* default policy to use when the request does not mandate any policy * tsa_policy1 = 1.2.3.4.1 */ policy_obj = OBJ_txt2obj(TSA_POLICY1, 0);