From 76806942103810c65379e71cf627f5490fe4674b Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 15 Mar 2023 06:34:07 +0000 Subject: Return the signature length after successful signing operation This is required behavior of the EVP_DigestSign() API, but seemingly almost nothing uses this. Well, turns out ldns does. Reported by Stephane. Helpful comments by sthen. ok jsing --- src/lib/libcrypto/ec/ecx_methods.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/libcrypto/ec/ecx_methods.c b/src/lib/libcrypto/ec/ecx_methods.c index 26fef18381..8510d1a471 100644 --- a/src/lib/libcrypto/ec/ecx_methods.c +++ b/src/lib/libcrypto/ec/ecx_methods.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecx_methods.c,v 1.4 2022/11/26 16:08:52 tb Exp $ */ +/* $OpenBSD: ecx_methods.c,v 1.5 2023/03/15 06:34:07 tb Exp $ */ /* * Copyright (c) 2022 Joel Sing * @@ -741,6 +741,8 @@ pkey_ecx_digestsign(EVP_MD_CTX *md_ctx, unsigned char *out_sig, ecx_key->priv_key)) return 0; + *out_sig_len = ecx_sig_size(pkey_ctx->pkey); + return 1; } -- cgit v1.2.3-55-g6feb