]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Restoring gost89 CMS support in gost engine for OpenSSL 3.0
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 3 May 2020 11:11:17 +0000 (14:11 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Mon, 4 May 2020 12:50:12 +0000 (15:50 +0300)
gost_ameth.c

index 92319e74c55ae3a85edde2484e30e0647d472e0e..de1cdcabff1edc6c9d0f26cf0e5900e12c7b94fe 100644 (file)
@@ -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