From: Ian Jackson Date: Tue, 19 Nov 2019 01:03:44 +0000 (+0000) Subject: make-secnet-sites: sort the properties in level.output_props X-Git-Tag: v0.5.1~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=e8e1ac249c8fc2c22a61f774024e2d2bcba22f5a make-secnet-sites: sort the properties in level.output_props This makes the test suite less sensitive to python version. Now it works with 2.7.13, 3.5.3,, 3.7.5. Signed-off-by: Ian Jackson --- diff --git a/make-secnet-sites b/make-secnet-sites index 74b09bd..4826a44 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -417,7 +417,7 @@ class level: def prop_out(self,n): return self.allow_properties[n](n,str(self.properties[n])) def output_props(self,w,ind): - for i in self.properties.keys(): + for i in sorted(self.properties.keys()): if self.allow_properties[i]: self.indent(w,ind) w.write("%s"%self.prop_out(i)) diff --git a/mtest/e-basic.conf b/mtest/e-basic.conf index 6469d20..9a4fde8 100644 --- a/mtest/e-basic.conf +++ b/mtest/e-basic.conf @@ -1,23 +1,23 @@ # secnet sites file autogenerated by make-secnet-sites version 0.1.18 -# Tue Nov 19 00:51:37 2019 +# Tue Nov 19 01:02:50 2019 # Command line: ./make-secnet-sites --no-conf-key-prefix test-example/sites ./mtest/d-basic/out.conf vpn-data { test-example { - # restrict-nets "172.18.232.0/28" - hash sha1; - dh diffie-hellman("8db5f2c15ac96d9f3382d1ef4688fba14dc7908ae7dfd71a9cfe7f479a75d506dc53f159aeaf488bde073fe544bc91c099f101fcf60074f30c06e36263c03ca9e07931ce3fc235fe1171dc6d9316fb097bd4362891e2c36e234e7c16b038fd97b1f165c710e90537de66ee4f54001f5712b050d4e07de3fba07607b19b64f6c3","2"); - setup-timeout 2000; - setup-retries 5; # Contact email address: + dh diffie-hellman("8db5f2c15ac96d9f3382d1ef4688fba14dc7908ae7dfd71a9cfe7f479a75d506dc53f159aeaf488bde073fe544bc91c099f101fcf60074f30c06e36263c03ca9e07931ce3fc235fe1171dc6d9316fb097bd4362891e2c36e234e7c16b038fd97b1f165c710e90537de66ee4f54001f5712b050d4e07de3fba07607b19b64f6c3","2"); + hash sha1; key-lifetime 72000000; + # restrict-nets "172.18.232.0/28" + setup-retries 5; + setup-timeout 2000; in { inside { name "test-example/in/inside"; - key rsa-public("65537","130064631890186713927887504218626486455931306300999583387009075747001546036643522074275473238061323169592347601185592753550279410171535737146240085267000508853176463710554801101055212967131924064664249613912656320653505750073021702169423354903540699008756137338575553686987244488914481168225136440872431691669"); - mobile True; address "[127.0.0.1]"; port 16910; + mobile True; + key rsa-public("65537","130064631890186713927887504218626486455931306300999583387009075747001546036643522074275473238061323169592347601185592753550279410171535737146240085267000508853176463710554801101055212967131924064664249613912656320653505750073021702169423354903540699008756137338575553686987244488914481168225136440872431691669"); link netlink { routes "172.18.232.8/29"; ptp-address "172.18.232.9"; @@ -27,8 +27,8 @@ vpn-data { out { outside { name "test-example/out/outside"; - key rsa-public("65537","129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941"); address "[::1]"; port 16900; + key rsa-public("65537","129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941"); link netlink { routes "172.18.232.0/29"; ptp-address "172.18.232.1";