X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=make-secnet-sites;h=b7720d2f1ece0a14b0f119fc5a3be73803095b4a;hb=79b8d68a8b64c76d929d776570afba963ae44647;hp=0f1e8bab8b7d99fc58788e833841a6d0f33a1286;hpb=1c31622d61a1382587f9478d0a36db34cfda8749;p=secnet.git diff --git a/make-secnet-sites b/make-secnet-sites index 0f1e8ba..b7720d2 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -413,7 +413,10 @@ class address (basetype): def __str__(self): return '"%s"; port %d'%(self.adr,self.port) -class rsakey (basetype): +class pubkey (basetype): + "Some kind of publie key" + +class rsakey (pubkey): "An RSA public key" def __init__(self,w): self.l=w[1].number(0,max['rsa_bits'],'rsa len') @@ -423,6 +426,12 @@ class rsakey (basetype): def __str__(self): return 'rsa-public("%s","%s")'%(self.e,self.n) +def somepubkey(w): + if w[0]=='pubkey': + return rsakey(w) + else: + assert(False) + # Possible properties of configuration nodes keywords={ 'contact':(email,"Contact address"), @@ -435,7 +444,7 @@ keywords={ 'renegotiate-time':(num,"Time after key setup to begin renegotiation (ms)"), 'restrict-nets':(networks,"Allowable networks"), 'networks':(networks,"Claimed networks"), - 'pubkey':(listof(rsakey),"RSA public site key"), + 'pubkey':(listof(somepubkey),"RSA public site key"), 'peer':(single_ipaddr,"Tunnel peer IP address"), 'address':(address,"External contact address and port"), 'mobile':(boolean,"Site is mobile"),