openssl/apps
Dr. Matthias St. Pierre fe50e11571 trace: ensure correct grouping
It is important that output to the trace channels occurs only inside
a trace group. This precondtion is satisfied whenever the standard
TRACE macros are used. It can be violated only by a bad programming
mistake, like copying the 'trc_out' pointer and using it outside
the trace group.

This commit enforces correct pairing of the OSSL_TRACE_CTRL_BEGIN and
OSSL_TRACE_CTRL_END callbacks, and checks that OSSL_TRACE_CTRL_WRITE
callbacks only occur within such groups.

While implementing it, it turned out that the group assertion failed

  apps/openssl.c:152: OpenSSL internal error: \
                      Assertion failed: trace_data->ingroup

because the set_trace_data() function invokes some callbacks which
generate trace output, but the correct channel type was set only
after the set_trace_data() call.

To fix the failed assertions, the correct channel type is now set
inside the set_trace_data() call, instead of doing it afterwards.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8463)
2019-03-15 08:48:43 +01:00
..
demoSRP Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
include testutil: ensure good treatment of argv on non-Unix platforms 2019-03-05 08:53:19 +01:00
app_rand.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
apps_ui.c Updated test command line parsing to support commmon commands 2019-02-11 15:31:51 +01:00
apps.c prevent app_get_pass() from revealing cleartext password on syntax error 2019-03-13 13:38:51 +01:00
asn1pars.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
bf_prefix.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
build.info openssl app for macs that uses the new EVP_MAC interface (the code inside dgst uses EVP_PKEY) 2019-03-11 12:44:56 +00:00
ca-cert.srl
ca-key.pem
ca-req.pem
ca.c apps/ca.c: only output DER with SPKAC input and when -out is chosen 2019-02-28 13:06:32 +01:00
CA.pl.in Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
cert.pem
ciphers.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
client.pem
cms.c crypto/cms: Add support for CAdES Basic Electronic Signatures (CAdES-BES) 2019-01-27 23:59:21 +01:00
crl2p7.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
crl.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
ct_log_list.cnf Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
dgst.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
dh1024.pem Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
dh2048.pem Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
dh4096.pem Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
dhparam.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
dsa512.pem
dsa1024.pem
dsa-ca.pem
dsa-pca.pem
dsa.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
dsap.pem
dsaparam.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
ec.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
ecparam.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
enc.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
engine.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
errstr.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
fmt.c Updated test command line parsing to support commmon commands 2019-02-11 15:31:51 +01:00
gendsa.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
genpkey.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
genrsa.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
mac.c openssl app for macs that uses the new EVP_MAC interface (the code inside dgst uses EVP_PKEY) 2019-03-11 12:44:56 +00:00
nseq.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
ocsp.c apps/ocsp.c Use the same HAVE_FORK / NO_FORK as in speed.c 2019-02-11 16:44:59 +01:00
openssl-vms.cnf Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
openssl.c trace: ensure correct grouping 2019-03-15 08:48:43 +01:00
openssl.cnf Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
opt.c Updated test command line parsing to support commmon commands 2019-02-11 15:31:51 +01:00
passwd.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
pca-cert.srl
pca-key.pem
pca-req.pem
pkcs7.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
pkcs8.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
pkcs12.c Complain if -twopass is used incorrectly 2019-01-30 15:36:13 +00:00
pkey.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
pkeyparam.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
pkeyutl.c Enable pkeyutl to use Ed448 and Ed25519 2019-03-14 12:42:16 +00:00
prime.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
privkey.pem
progs.pl Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
rand.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
rehash.c Cleanup vxworks support to be able to compile for VxWorks 7 2019-01-24 17:55:04 +01:00
req.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
req.pem
rsa8192.pem
rsa.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
rsautl.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_cb.c Fix -verify_return_error in s_client 2019-02-14 17:07:57 +00:00
s_client.c Adapt SSL_DEBUG to the new generic trace API 2019-03-06 11:15:13 +01:00
s_server.c Fix end-point shared secret for DTLS/SCTP 2019-02-01 11:57:19 +00:00
s_socket.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
s_time.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
server2.pem
server.pem
server.srl
sess_id.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
smime.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
speed.c Cleanup vxworks support to be able to compile for VxWorks 7 2019-01-24 17:55:04 +01:00
spkac.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
srp.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
storeutl.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
testCA.pem
testdsa.h Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
testrsa.h Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
timeouts.h Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
ts.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
tsget.in apps/tsget.in: use the full version in the user agent string 2018-12-10 20:09:17 +01:00
verify.c Support SM2 certificate verification 2019-03-13 15:29:39 +08:00
version.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
vms_decc_argv.c testutil: ensure good treatment of argv on non-Unix platforms 2019-03-05 08:53:19 +01:00
vms_decc_init.c VMS: move copy_argc to its own module and make it an aux source 2019-03-05 08:51:09 +01:00
vms_term_sock.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
vms_term_sock.h Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
win32_init.c Following the license change, modify the boilerplates in apps/ 2018-12-06 14:15:27 +01:00
x509.c fix x509 -force_pubkey option to take effect with cert input or self-signing; improve its doc 2019-02-25 10:26:23 +00:00