openssl/apps
Diego Santa Cruz 0e83981d61 Fix srp app missing NULL termination with password callback
The password_callback() function does not necessarily NULL terminate
the password buffer, the caller must use the returned length but the
srp app uses this function as if it was doing NULL termination.

This made the -passin and -passout options of "openssl srp"
fail inexpicably and randomly or even crash.

Fixed by enlarging the buffer by one, so that the maximum password length
remains unchanged, and adding NULL termination upon return.

[Rearrange code for coding style compliance in process.]

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3475)
2017-05-22 10:29:16 +02:00
..
demoSRP Missing SRP files. 2011-03-16 11:50:33 +00:00
app_rand.c cherry pick pr-512 changes 2016-05-29 13:36:59 -04:00
apps.c Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00
apps.h Add the -groups option to s_server/s_client 2017-05-03 16:39:32 +01:00
asn1pars.c Constify command options 2016-10-14 18:25:50 +02:00
build.info Simplify INCLUDE statements in build.info files 2016-07-01 18:36:08 +02:00
ca-cert.srl Update test server certificate in apps/server.pem (it was expired). 2000-10-16 22:56:10 +00:00
ca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca.c Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00
CA.pl.in apps/req.c: flag "-new" is implied by "-precert" 2017-02-22 10:40:30 -05:00
cert.pem Import of old SSLeay release: SSLeay 0.9.0b 1998-12-21 10:56:39 +00:00
ciphers.c Add the SSL_METHOD for TLSv1.3 and all other base changes required 2016-11-02 13:08:21 +00:00
client.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
cms.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
crl2p7.c Constify command options 2016-10-14 18:25:50 +02:00
crl.c Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00
ct_log_list.cnf GH1536: Install empty CT log list 2016-09-14 18:22:33 -04:00
dgst.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
dh1024.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dh2048.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dh4096.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dhparam.c Ensure dhparams can handle X9.42 params in DER 2017-04-03 20:04:06 +01:00
dsa512.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
dsa1024.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
dsa-ca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa-pca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa.c Support MSBLOB format if RC4 is disabled 2016-11-17 18:45:42 +00:00
dsap.pem Import of old SSLeay release: SSLeay 0.9.0b 1998-12-21 10:56:39 +00:00
dsaparam.c Remove GENCB_TEST compile flag 2017-02-28 12:59:22 -05:00
ec.c Fix some extra or missing whitespaces... 2017-01-25 09:06:34 +00:00
ecparam.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
enc.c openssl enc: Don't unbuffer stdin 2017-04-25 15:03:11 +02:00
engine.c Fix gcc-7 warnings. 2017-05-11 19:39:38 +02:00
errstr.c Constify command options 2016-10-14 18:25:50 +02:00
gendsa.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
genpkey.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
genrsa.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
nseq.c Constify command options 2016-10-14 18:25:50 +02:00
ocsp.c OCSP Updates: error codes and multiple certificates 2017-04-12 14:41:10 -04:00
openssl-vms.cnf Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
openssl.c Clean up references to FIPS 2017-02-28 15:26:25 +01:00
openssl.cnf Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
opt.c Remove debugging leftovers in apps/opt.c 2017-02-28 15:23:40 +01:00
passwd.c More typo fixes 2017-03-29 07:14:29 +02:00
pca-cert.srl Update test server certificate in apps/server.pem (it was expired). 2000-10-16 22:56:10 +00:00
pca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pkcs7.c Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00
pkcs8.c Increase the password buffer size to APP_PASS_LEN. 2017-03-07 10:12:05 +10:00
pkcs12.c -inkey can be an identifier, not just a file 2017-05-21 17:20:31 -04:00
pkey.c print errors in pkey utility 2017-01-08 01:42:50 +00:00
pkeyparam.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
pkeyutl.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
prime.c Fix some extra or missing whitespaces... 2017-01-25 09:06:34 +00:00
privkey.pem PR: 1644 2009-09-06 15:49:46 +00:00
progs.h Fix style issue 2016-10-14 18:25:50 +02:00
progs.pl Fix style issue 2016-10-14 18:25:50 +02:00
rand.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
rehash.c Convert uses of snprintf to BIO_snprintf 2017-05-02 12:29:35 -04:00
req.c Fix regression in openssl req -x509 behaviour. 2017-05-11 17:18:16 +02:00
req.pem Import of old SSLeay release: SSLeay 0.9.0b 1998-12-21 10:56:39 +00:00
rsa8192.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
rsa.c Support MSBLOB format if RC4 is disabled 2016-11-17 18:45:42 +00:00
rsautl.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
s512-key.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
s512-req.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
s1024key.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
s1024req.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
s_apps.h Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00
s_cb.c Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00
s_client.c Add checks on return code when applying some settings. 2017-04-28 15:49:36 +02:00
s_server.c Fix an s_server infinite loop 2017-05-09 10:35:33 +01:00
s_socket.c Fix some variable references in init_client 2017-04-25 11:13:39 +01:00
s_time.c Provided support for the -nameopt flag in s_client, s_server and s_time 2017-02-21 13:50:00 -05:00
server2.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
server.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
server.srl Import of old SSLeay release: SSLeay 0.9.0b 1998-12-21 10:56:39 +00:00
sess_id.c Constify command options 2016-10-14 18:25:50 +02:00
smime.c -inkey can be an identifier, not just a file 2017-05-21 17:20:31 -04:00
speed.c Make default_method mostly compile-time 2017-04-07 12:19:46 -04:00
spkac.c If an engine comes up explicitely, it must also come down explicitely 2016-10-19 17:44:08 +02:00
srp.c Fix srp app missing NULL termination with password callback 2017-05-22 10:29:16 +02:00
testCA.pem Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00
testdsa.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
testrsa.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
timeouts.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ts.c -inkey can be an identifier, not just a file 2017-05-21 17:20:31 -04:00
tsget.in perl: Separate compile-time environment from runtime environment 2016-07-04 15:40:31 +02:00
verify.c Fix gcc-7 warnings. 2017-05-11 19:39:38 +02:00
version.c Constify command options 2016-10-14 18:25:50 +02:00
vms_decc_init.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
vms_term_sock.c Reformat to fit OpenSSL source code standards 2016-09-15 23:24:06 +02:00
vms_term_sock.h Reformat to fit OpenSSL source code standards 2016-09-15 23:24:06 +02:00
win32_init.c Fix not-c code 2016-10-19 00:56:48 +02:00
x509.c Switch command-line utils to new nameopt API. 2017-04-25 12:37:17 -04:00