openssl/apps
Xiaofei Bai e7414634a5 Fix sigsize usage in apps/speed.c
In a recent upstream change
(43da9a14f0)
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)
2021-11-09 15:40:55 +01:00
..
demoSRP
include Revise s_client and s_server verbiage re secure renegotiation. 2021-11-02 16:30:10 +01:00
lib Revise s_client and s_server verbiage re secure renegotiation. 2021-11-02 16:30:10 +01:00
asn1parse.c
build.info
ca-cert.srl
ca-key.pem
ca-req.pem
ca.c Remove executable mode attributes of non-executable files 2021-07-13 16:04:32 +10:00
CA.pl.in apps/CA.pl.in: restore the quotes around -CAfile, they were there for a reason 2021-06-26 06:43:09 +02:00
cert.pem
ciphers.c apps/ciphers: Fix wrong return value when using -convert parameter 2021-08-25 09:23:01 +02:00
client.pem
cmp.c APPS/cmp: make the -sans option support email addresses (type rfc822Name) 2021-11-08 07:47:55 +01:00
cms.c CMS app: Fix new -wrap option 2021-08-25 20:01:09 +02:00
crl2pkcs7.c
crl.c Add support for ISO 8601 datetime format 2021-06-11 12:39:46 +02:00
ct_log_list.cnf
dgst.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
dhparam.c Bugfix: unsafe return check of EVP_PKEY_fromdata 2021-10-11 10:45:21 +02:00
dsa512.pem
dsa1024.pem
dsa-ca.pem
dsa-pca.pem
dsa.c
dsap.pem
dsaparam.c
ec.c
ecparam.c
enc.c apps: remove AEAD/mode checks that are now redundant 2021-06-16 18:32:30 +10:00
engine.c
errstr.c
fipsinstall.c fipsinstall: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
gendsa.c
genpkey.c genpkey: -quiet doesn't take an argument 2021-08-12 16:26:22 +10:00
genrsa.c
info.c
insta.ca.crt
kdf.c kdf: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
list.c list: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
mac.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
nseq.c
ocsp.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
openssl-vms.cnf Disclaimer about the default provider activation added to config 2021-08-12 09:59:34 +02:00
openssl.c Clean up on failed BIO creation 2021-10-22 11:56:29 +02:00
openssl.cnf Disclaimer about the default provider activation added to config 2021-08-12 09:59:34 +02:00
passwd.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
pca-cert.srl
pca-key.pem
pca-req.pem
pkcs7.c
pkcs8.c
pkcs12.c apps/pkcs12: Do not assume null termination of ASN1_UTF8STRING 2021-08-31 12:20:12 +02:00
pkey.c APPS: Restore the possibility to combine -pubout with -text 2021-06-10 08:34:09 +02:00
pkeyparam.c
pkeyutl.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
prime.c
privkey.pem
progs.pl
rand.c
rehash.c
req.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
req.pem
rsa8192.pem
rsa.c rsa: Try legacy encoding functions for pubkey 2021-08-24 17:56:46 +02:00
rsautl.c
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_client.c Revise s_client and s_server verbiage re secure renegotiation. 2021-11-02 16:30:10 +01:00
s_server.c Revise s_client and s_server verbiage re secure renegotiation. 2021-11-02 16:30:10 +01:00
s_time.c s_time: avoid unlikely division by zero 2021-06-30 13:55:09 +10:00
server2.pem
server.pem
server.srl
sess_id.c
smime.c apps: use get_cipher_any() instead of get_cipher() for commands that support these ciphers/modes 2021-06-16 18:32:30 +10:00
speed.c Fix sigsize usage in apps/speed.c 2021-11-09 15:40:55 +01:00
spkac.c spkac: allow digests other than MD5 to be used for signing 2021-06-15 18:26:34 +10:00
srp.c
storeutl.c
testCA.pem
testdsa.h
testrsa.h
timeouts.h
ts.c
tsget.in convert tabs to spaces in two distributed Perl scripts 2021-09-14 07:21:22 +10:00
verify.c
version.c
vms_decc_init.c
x509.c APPS/x509: Fix generation of AKID via v2i_AUTHORITY_KEYID() 2021-11-08 09:15:13 +01:00