s3:utils: Add weak crypto information to testparm
authorAndreas Schneider <asn@samba.org>
Mon, 4 Nov 2019 16:26:48 +0000 (17:26 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Mar 2020 20:46:41 +0000 (20:46 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/testparm.c
source3/utils/wscript_build

index e4c805da9a3f3cf3d3a18d27cfe673ac7263587a..2d717f197569625cfccc7215373c9a2640154cf3 100644 (file)
@@ -35,6 +35,7 @@
 #include "system/filesys.h"
 #include "popt_common.h"
 #include "lib/param/loadparm.h"
+#include "lib/crypto/gnutls_helpers.h"
 #include "cmdline_contexts.h"
 
 #include <regex.h>
@@ -653,6 +654,7 @@ static void do_per_share_checks(int s)
        const char *caddr;
        static int show_defaults;
        static int skip_logic_checks = 0;
+       const char *weak_crypo_str = "";
 
        struct poptOption long_options[] = {
                POPT_AUTOHELP
@@ -758,6 +760,13 @@ static void do_per_share_checks(int s)
 
        fprintf(stderr,"Loaded services file OK.\n");
 
+       if (samba_gnutls_weak_crypto_allowed()) {
+               weak_crypo_str = "allowed";
+       } else {
+               weak_crypo_str = "disallowed";
+       }
+       fprintf(stderr, "Weak crypto is %s\n", weak_crypo_str);
+
        if (skip_logic_checks == 0) {
                ret = do_global_checks();
        }
index 2e6d61d4cd44b143316e430a41a7e783f08e16b4..4dbc0234b047a9d6129b031457d0df8dd82e6d6e 100644 (file)
@@ -175,6 +175,7 @@ bld.SAMBA3_BINARY('testparm',
                  smbconf
                  popt_samba3
                  cmdline_contexts
+                 GNUTLS_HELPERS
                  ''')
 
 bld.SAMBA3_BINARY('net',