#!/bin/sh # # Blackbox tests for weak crypto # Copyright (c) 2020 Andreas Schneider # if [ $# -lt 6 ]; then cat <&1 || failed=$(expr $failed + 1) # We should be allowed to use NTLM for connecting testit "rpclient.ntlm" $samba_rpcclient ncacn_np:$SERVER $opt -c "getusername" || failed=$(expr $failed + 1) GNUTLS_FORCE_FIPS_MODE=1 export GNUTLS_FORCE_FIPS_MODE # Checks that testparm reports: Weak crypto is disallowed testit_grep "testparm" "Weak crypto is disallowed" $samba_testparm --suppress-prompt $SMB_CONF_PATH 2>&1 || failed=$(expr $failed + 1) # We should not be allowed to use NTLM for connecting testit_expect_failure "rpclient.ntlm" $samba_rpcclient ncacn_np:$SERVER $opt -c "getusername" || failed=$(expr $failed + 1) unset GNUTLS_FORCE_FIPS_MODE exit $failed