From 5e985eed3d6d69d84303736455f96dbc8220fb8a Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 9 Jan 2022 23:55:31 +0000 Subject: [PATCH] Use C99 initializers for test_sha_md ok inoguchi jsing --- lib/libcrypto/engine/eng_openssl.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/libcrypto/engine/eng_openssl.c b/lib/libcrypto/engine/eng_openssl.c index 8bc508f7a48..1a6113ba6d8 100644 --- a/lib/libcrypto/engine/eng_openssl.c +++ b/lib/libcrypto/engine/eng_openssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_openssl.c,v 1.14 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: eng_openssl.c,v 1.15 2022/01/09 23:55:31 tb Exp $ */ /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL * project 2000. */ @@ -351,18 +351,17 @@ test_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) } static const EVP_MD test_sha_md = { - NID_sha1, - NID_sha1WithRSAEncryption, - SHA_DIGEST_LENGTH, - 0, - test_sha1_init, - test_sha1_update, - test_sha1_final, - NULL, - NULL, - EVP_PKEY_RSA_method, - SHA_CBLOCK, - sizeof(EVP_MD *) + sizeof(SHA_CTX), + .type = NID_sha1, + .pkey_type = NID_sha1WithRSAEncryption, + .md_size = SHA_DIGEST_LENGTH, + .flags = 0, + .init = test_sha1_init, + .update = test_sha1_update, + .final = test_sha1_final, + .copy = NULL, + .cleanup = NULL, + .block_size = SHA_CBLOCK, + .ctx_size = sizeof(EVP_MD *) + sizeof(SHA_CTX), }; static int -- 2.20.1