From bf06cbf5baa8d0f589bfb090455c3988c261a3f7 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Fri, 3 Dec 2021 12:14:53 +0300 Subject: [PATCH] MSVC: Replace tentative arrays with pointers Error message example: gost_prov_cipher.c(237,63): error C2059: syntax error: '}' Signed-off-by: Vitaly Chikunov --- gost_prov_cipher.c | 30 +++++++++++++++--------------- gost_prov_digest.c | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gost_prov_cipher.c b/gost_prov_cipher.c index d64b0ff..ea42f23 100644 --- a/gost_prov_cipher.c +++ b/gost_prov_cipher.c @@ -234,21 +234,21 @@ static int cipher_final(void *vgctx, return res > 0; } -static const OSSL_PARAM known_Gost28147_89_cipher_params[] = {}; -static const OSSL_PARAM known_Gost28147_89_cbc_cipher_params[] = {}; -static const OSSL_PARAM known_Gost28147_89_cnt_cipher_params[] = {}; -static const OSSL_PARAM known_Gost28147_89_cnt_12_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_ecb_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_cbc_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_cfb_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_ofb_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_ctr_cipher_params[] = {}; -static const OSSL_PARAM known_magma_ctr_cipher_params[] = {}; -static const OSSL_PARAM known_magma_ctr_acpkm_cipher_params[] = {}; -static const OSSL_PARAM known_magma_ctr_acpkm_omac_cipher_params[] = {}; -static const OSSL_PARAM known_magma_cbc_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_ctr_acpkm_cipher_params[] = {}; -static const OSSL_PARAM known_grasshopper_ctr_acpkm_omac_cipher_params[] = {}; +static const OSSL_PARAM *known_Gost28147_89_cipher_params; +static const OSSL_PARAM *known_Gost28147_89_cbc_cipher_params; +static const OSSL_PARAM *known_Gost28147_89_cnt_cipher_params; +static const OSSL_PARAM *known_Gost28147_89_cnt_12_cipher_params; +static const OSSL_PARAM *known_grasshopper_ecb_cipher_params; +static const OSSL_PARAM *known_grasshopper_cbc_cipher_params; +static const OSSL_PARAM *known_grasshopper_cfb_cipher_params; +static const OSSL_PARAM *known_grasshopper_ofb_cipher_params; +static const OSSL_PARAM *known_grasshopper_ctr_cipher_params; +static const OSSL_PARAM *known_magma_ctr_cipher_params; +static const OSSL_PARAM *known_magma_ctr_acpkm_cipher_params; +static const OSSL_PARAM *known_magma_ctr_acpkm_omac_cipher_params; +static const OSSL_PARAM *known_magma_cbc_cipher_params; +static const OSSL_PARAM *known_grasshopper_ctr_acpkm_cipher_params; +static const OSSL_PARAM *known_grasshopper_ctr_acpkm_omac_cipher_params; /* * These are named like the EVP_CIPHER templates in gost_crypt.c, with the * added suffix "_functions". Hopefully, that makes it easy to find the diff --git a/gost_prov_digest.c b/gost_prov_digest.c index 9acd005..79eb5a3 100644 --- a/gost_prov_digest.c +++ b/gost_prov_digest.c @@ -131,9 +131,9 @@ static int digest_final(void *vgctx, return res > 0; } -static const OSSL_PARAM known_GostR3411_94_digest_params[] = {}; -static const OSSL_PARAM known_GostR3411_2012_256_digest_params[] = {}; -static const OSSL_PARAM known_GostR3411_2012_512_digest_params[] = {}; +static const OSSL_PARAM *known_GostR3411_94_digest_params; +static const OSSL_PARAM *known_GostR3411_2012_256_digest_params; +static const OSSL_PARAM *known_GostR3411_2012_512_digest_params; /* * These are named like the EVP_MD templates in gost_md.c etc, with the -- 2.39.2