trace: rename the default trace category from 'ANY' to 'ALL'
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Thu, 21 Mar 2019 17:59:13 +0000 (18:59 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 29 Mar 2019 23:04:37 +0000 (00:04 +0100)
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)

apps/openssl.c
crypto/trace.c
doc/man3/OSSL_trace_enabled.pod
doc/man3/OSSL_trace_set_channel.pod
include/openssl/trace.h

index a63f82b15b3097e6f298402a6ba53f9e968dde40..9c0d933d7b889b95fb1b4296986b9b595db70a5a 100644 (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);
 
         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;
                 while (++category < OSSL_TRACE_CATEGORY_NUM)
                     setup_trace_category(category);
                 break;
index 70e93c292d3698aa44ae02861bcd7881ba4361a9..efcf8be76c5557d20c029d99f092d10c8b5cf63a 100644 (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[] = {
 #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),
     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 -1;
     if (trace_channels[category].bio != NULL)
         return category;
-    return OSSL_TRACE_CATEGORY_ANY;
+    return OSSL_TRACE_CATEGORY_ALL;
 }
 #endif
 
 }
 #endif
 
index 98e3bd63568e009044d3a472beb2ad8e9c45b82b..e26dee5370121bd14092ab2e924462abf6ec13a1 100644 (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>.
 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
 with the functions described here.
 
 Tracing for a specific category is enabled if a so called
index 0fb7d06a6b2ba4853462ef2f8166f704d5552aa1..46e248f45d067fca8ddbfa52826763802acf78e7 100644 (file)
@@ -178,7 +178,7 @@ Traces BIGNUM context operations.
 
 =back
 
 
 =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
 and can be used to get I<all> trace output.
 
 Note, however, that in this case all trace output will effectively be
index 13cd2dd6f30bd2c61ca3a485f88633847b7185fc..48c98ca396bfda7356dfb364383ada3aac9cdeaa 100644 (file)
@@ -30,13 +30,13 @@ extern "C" {
  * BIO which sends all trace output it receives to the registered application
  * callback.
  *
  * 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.)
  */
  * 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
 # define OSSL_TRACE_CATEGORY_TRACE               1
 # define OSSL_TRACE_CATEGORY_INIT                2
 # define OSSL_TRACE_CATEGORY_TLS                 3