]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix EAP tests against specific TLS versions
authorJorge Pereira <jpereiran@gmail.com>
Fri, 2 Apr 2021 13:55:18 +0000 (10:55 -0300)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 2 Apr 2021 16:46:13 +0000 (12:46 -0400)
We just need the tls_disable_tlsvXX=1 due to hostapd enables all TLS
versions.

src/tests/Makefile

index de948cfe0e878e35a009835e2488158d7d14cd18..d26adec75ff8300864daa15aa41decab26050758 100644 (file)
@@ -191,6 +191,9 @@ ifneq "$(prefix)" ""
 define EAP_TLS_CONFIG
 $(BUILD_PATH)/tests/eap/${1}-${2}.conf: $(top_builddir)/src/tests/${1}.conf
        @sed 's/phase1="/phase1="$(subst $(subst .,_,${2})=1,$(subst .,_,${2})=0,$(EAP_TLS_DISABLE_STRING)) /' < $$< > $$@
+#   Just keep the TLS versions that we want to disable. e.g: tls_disable_tlsv1_XX=1
+       @sed '/phase1=/s/tls_disable_tlsv1_[0-9]=0//g' < $$@ > $$@.tmp
+       @mv -f $$@.tmp $$@
 
 $(BUILD_PATH)/tests/eap/${1}-${2}.ok: $(BUILD_PATH)/tests/eap/${1}-${2}.conf
        @echo EAPOL_TEST $$(notdir $$(patsubst %.ok,%,$$@))