From 47468d46a29a8a75919c8c03877ce007929c813c Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 31 Mar 2023 17:47:39 +0000 Subject: [PATCH] Inline only use of TS_VERIFY_CTX_init() Since TS_VERIFY_CTX is now opaque, the only thing TS_VERIFY_CTX_init() is good for outside the library is memory leaks. Inside the library it's also useless, since as a much more familiar name is memset(). It will soon be able to join all the other nonsense that should never have leaked out of this library. --- lib/libcrypto/ts/ts_verify_ctx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/ts/ts_verify_ctx.c b/lib/libcrypto/ts/ts_verify_ctx.c index ef0ec6ca7f8..2a3b1c316d1 100644 --- a/lib/libcrypto/ts/ts_verify_ctx.c +++ b/lib/libcrypto/ts/ts_verify_ctx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_verify_ctx.c,v 1.11 2022/07/24 19:54:46 tb Exp $ */ +/* $OpenBSD: ts_verify_ctx.c,v 1.12 2023/03/31 17:47:39 tb Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2003. */ @@ -111,7 +111,7 @@ TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx) GENERAL_NAME_free(ctx->tsa_name); - TS_VERIFY_CTX_init(ctx); + memset(ctx, 0, sizeof(*ctx)); } /* -- 2.20.1