diff options
author | tb <> | 2023-03-15 06:34:07 +0000 |
---|---|---|
committer | tb <> | 2023-03-15 06:34:07 +0000 |
commit | 76806942103810c65379e71cf627f5490fe4674b (patch) | |
tree | ccf6aca35a7fe89d2092355caf535a1e325679b3 /src/lib | |
parent | 6df89ce3971584288bd4b1ba518797e8f38214f5 (diff) | |
download | openbsd-76806942103810c65379e71cf627f5490fe4674b.tar.gz openbsd-76806942103810c65379e71cf627f5490fe4674b.tar.bz2 openbsd-76806942103810c65379e71cf627f5490fe4674b.zip |
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
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/ec/ecx_methods.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
1 | /* $OpenBSD: ecx_methods.c,v 1.4 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: ecx_methods.c,v 1.5 2023/03/15 06:34:07 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -741,6 +741,8 @@ pkey_ecx_digestsign(EVP_MD_CTX *md_ctx, unsigned char *out_sig, | |||
741 | ecx_key->priv_key)) | 741 | ecx_key->priv_key)) |
742 | return 0; | 742 | return 0; |
743 | 743 | ||
744 | *out_sig_len = ecx_sig_size(pkey_ctx->pkey); | ||
745 | |||
744 | return 1; | 746 | return 1; |
745 | } | 747 | } |
746 | 748 | ||