Add a bit of tracing in the core conf module runner
authorRichard Levitte <levitte@openssl.org>
Fri, 5 Apr 2019 09:02:17 +0000 (11:02 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 5 Apr 2019 10:50:55 +0000 (12:50 +0200)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/8680)

crypto/conf/conf_mod.c

index 3ad09a79a17a73c07575d83c29b3fa39d8262be8..56b19467a28b3b58c4ef3a7a3d4db85c240b2787 100644 (file)
@@ -14,6 +14,7 @@
 #include "internal/conf.h"
 #include "internal/dso.h"
 #include <openssl/x509.h>
 #include "internal/conf.h"
 #include "internal/dso.h"
 #include <openssl/x509.h>
+#include <openssl/trace.h>
 
 #define DSO_mod_init_name "OPENSSL_init"
 #define DSO_mod_finish_name "OPENSSL_finish"
 
 #define DSO_mod_init_name "OPENSSL_init"
 #define DSO_mod_finish_name "OPENSSL_finish"
@@ -92,6 +93,7 @@ int CONF_modules_load(const CONF *cnf, const char *appname,
         return 1;
     }
 
         return 1;
     }
 
+    OSSL_TRACE1(CONF, "Configuration in section %s\n", vsection);
     values = NCONF_get_section(cnf, vsection);
 
     if (!values)
     values = NCONF_get_section(cnf, vsection);
 
     if (!values)
@@ -100,6 +102,8 @@ int CONF_modules_load(const CONF *cnf, const char *appname,
     for (i = 0; i < sk_CONF_VALUE_num(values); i++) {
         vl = sk_CONF_VALUE_value(values, i);
         ret = module_run(cnf, vl->name, vl->value, flags);
     for (i = 0; i < sk_CONF_VALUE_num(values); i++) {
         vl = sk_CONF_VALUE_value(values, i);
         ret = module_run(cnf, vl->name, vl->value, flags);
+        OSSL_TRACE3(CONF, "Running module %s (%s) returned %d\n",
+                    vl->name, vl->value, ret);
         if (ret <= 0)
             if (!(flags & CONF_MFLAGS_IGNORE_ERRORS))
                 return ret;
         if (ret <= 0)
             if (!(flags & CONF_MFLAGS_IGNORE_ERRORS))
                 return ret;