From 7040fcae6a2451ee0b098503499973ba246cca24 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Sun, 3 May 2020 14:11:17 +0300 Subject: [PATCH] Restoring gost89 CMS support in gost engine for OpenSSL 3.0 --- gost_ameth.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gost_ameth.c b/gost_ameth.c index 92319e7..de1cdca 100644 --- a/gost_ameth.c +++ b/gost_ameth.c @@ -445,10 +445,12 @@ static int pkey_ctrl_gost(EVP_PKEY *pkey, int op, long arg1, void *arg2) *(int *)arg2 = CMS_RECIPINFO_TRANS; return 1; case ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED: - if (arg1 == CMS_RECIPINFO_AGREE || arg1 == CMS_RECIPINFO_TRANS) - return 1; + if (arg1 == CMS_RECIPINFO_AGREE || arg1 == CMS_RECIPINFO_TRANS) { + *(int *)arg2 = 1; + return 1; + } else - return 0; + return 0; break; #endif #endif -- 2.39.5