diff options
author | Xiaofei Bai <xiaofei.bai@arm.com> | 2021-11-03 03:28:23 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-11-09 16:11:58 +0100 |
commit | c37ff82e7c3993292fcc0524e5dde429fa3b65eb (patch) | |
tree | 3819377a2f5a432ef4d22b530c5e58a15484a7a8 /crypto/cms | |
parent | 419afbf8a3adeffc598e32963bc041599b4007a8 (diff) |
Fix sigsize usage in apps/speed.c
In a recent upstream change
(43da9a14f0e73f42f28ae34219929b44df5d1a11)
the parameter sigsize become a read/write input in
EVP_PKEY_sign(), and after signing, sigsize will be overwritten with
the actual size and used in the verify step. As the speed program
calls EVP_PKEY_sign() on the same context repeatedly, sigsize value is
no longer the initial available size, and may fail in later buffer
size checks.
This fix adds a new buflen member in struct loopargs (which is only
used within apps/speed.c), to save available buffer size and
to be used as sigsize input in EVP_PKEY_sign() calls.
Sigsize still contains the signature size for the verify step.
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16991)
(cherry picked from commit e7414634a59aa61c7917193a31382ced95d40eeb)
Diffstat (limited to 'crypto/cms')
0 files changed, 0 insertions, 0 deletions