Hack on the newly imported X25519 and X448 code.
[secnet] / make-secnet-sites
index b66f950..f3beffa 100755 (executable)
@@ -97,7 +97,7 @@ class hash:
        "A choice of hash function"
        def __init__(self,w):
                self.ht=w[1]
-               if (self.ht!='md5' and self.ht!='sha1'):
+               if (self.ht not in ('md5', 'sha1', 'sha512')):
                        complain("unknown hash type %s"%(self.ht))
        def __str__(self):
                return '%s'%(self.ht)
@@ -380,13 +380,16 @@ def pline(i,allow_include=False):
                        current=nl
                obstack.append(current)
                return [i]
-       if current.allow_properties.has_key(keyword):
-               set_property(current,w)
-               return [i]
-       else:
+       if not current.allow_properties.has_key(keyword):
                complain("Property %s not allowed at %s level"%
                        (keyword,current.type))
                return []
+       elif current.depth == vpnlevel.depth < allow_defs:
+               complain("Not allowed to set VPN properties here")
+               return []
+       else:
+               set_property(current,w)
+               return [i]
 
        complain("unknown keyword '%s'"%(keyword))