X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/35744ac3584df4b658ae4d4c17fd71c620e3ba26..a4902c660c01eaada34877d32f374a7d05947b46:/make-secnet-sites diff --git a/make-secnet-sites b/make-secnet-sites index c079bcc..e63a2c2 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -103,13 +103,16 @@ class networks (basetype): def __str__(self): return ",".join(map((lambda n: '"%s"'%n), self.set.networks())) -class dhgroup (basetype): +class trad_dhgroup (basetype): "A Diffie-Hellman group" def __init__(self,w): self.mod=w[1] self.gen=w[2] def __str__(self): return 'diffie-hellman("%s","%s")'%(self.mod,self.gen) +def dhgroup(w): + if w[1] in ('x25519', 'x448'): return w[1] + else: return trad_dhgroup(w) class hash (basetype): "A choice of hash function" @@ -168,7 +171,7 @@ class rsakey (basetype): # Possible properties of configuration nodes keywords={ 'contact':(email,"Contact address"), - 'dh':(dhgroup,"Diffie-Hellman group"), + 'dh':(listof(dhgroup),"Diffie-Hellman group"), 'hash':(hash,"Hash function"), 'key-lifetime':(num,"Maximum key lifetime (ms)"), 'setup-timeout':(num,"Key setup timeout (ms)"),