The hash was just created with EVP_MD_CTX_new(), so we memset a calloced
piece of memory to 0.
-/* $OpenBSD: sm2_crypt.c,v 1.2 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: sm2_crypt.c,v 1.3 2024/02/09 07:43:52 tb Exp $ */
/*
* Copyright (c) 2017, 2019 Ribose Inc
*
goto err;
}
- EVP_MD_CTX_init(hash);
while ((key_len > 0) && (ctr != 0)) {
if (!EVP_DigestInit_ex(hash, digest, NULL)) {
SM2error(ERR_R_EVP_LIB);