trace: rename the default trace category from 'ANY' to 'ALL'

It seems more intuitive to set `OPENSSL_TRACE=all` instead of
`OPENSSL_TRACE=any` to obtain trace output for all categories.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8552)
This commit is contained in:
Dr. Matthias St. Pierre 2019-03-21 18:59:13 +01:00
parent 02bd2d7f5c
commit 3a8269b319
5 changed files with 7 additions and 7 deletions

View File

@ -226,7 +226,7 @@ static void setup_trace(const char *str)
for (valp = val; (item = strtok(valp, ",")) != NULL; valp = NULL) {
int category = OSSL_trace_get_category_num(item);
if (category == OSSL_TRACE_CATEGORY_ANY) {
if (category == OSSL_TRACE_CATEGORY_ALL) {
while (++category < OSSL_TRACE_CATEGORY_NUM)
setup_trace_category(category);
break;

View File

@ -119,7 +119,7 @@ struct trace_category_st {
#define TRACE_CATEGORY_(name) { #name, OSSL_TRACE_CATEGORY_##name }
static const struct trace_category_st trace_categories[] = {
TRACE_CATEGORY_(ANY),
TRACE_CATEGORY_(ALL),
TRACE_CATEGORY_(TRACE),
TRACE_CATEGORY_(INIT),
TRACE_CATEGORY_(TLS),
@ -422,7 +422,7 @@ static int ossl_trace_get_category(int category)
return -1;
if (trace_channels[category].bio != NULL)
return category;
return OSSL_TRACE_CATEGORY_ANY;
return OSSL_TRACE_CATEGORY_ALL;
}
#endif

View File

@ -40,7 +40,7 @@ The tracing output is divided into types which are enabled
individually by the application.
The tracing types are described in detail in
L<OSSL_trace_set_callback(3)/Trace types>.
The fallback type C<OSSL_TRACE_CATEGORY_ANY> should I<not> be used
The fallback type C<OSSL_TRACE_CATEGORY_ALL> should I<not> be used
with the functions described here.
Tracing for a specific category is enabled if a so called

View File

@ -178,7 +178,7 @@ Traces BIGNUM context operations.
=back
There is also C<OSSL_TRACE_CATEGORY_ANY>, which works as a fallback
There is also C<OSSL_TRACE_CATEGORY_ALL>, which works as a fallback
and can be used to get I<all> trace output.
Note, however, that in this case all trace output will effectively be

View File

@ -30,13 +30,13 @@ extern "C" {
* BIO which sends all trace output it receives to the registered application
* callback.
*
* The ANY category can be used as a fallback category to register a single
* The ALL category can be used as a fallback category to register a single
* channel which receives the output from all categories. However, if the
* application intends to print the trace channel name in the line prefix,
* it is better to register channels for all categories separately.
* (This is how the openssl application does it.)
*/
# define OSSL_TRACE_CATEGORY_ANY 0 /* The fallback */
# define OSSL_TRACE_CATEGORY_ALL 0 /* The fallback */
# define OSSL_TRACE_CATEGORY_TRACE 1
# define OSSL_TRACE_CATEGORY_INIT 2
# define OSSL_TRACE_CATEGORY_TLS 3