diff options
author | Rob Austein <sra@hactrn.net> | 2007-07-10 21:29:27 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-07-10 21:29:27 +0000 |
commit | c64c03ac1c38fedda5af2ab195bac8acf57b9072 (patch) | |
tree | 3e60ae3661160a2b18325563a9a3cc55f0e9b975 /scripts | |
parent | e43bf87f3b91afd8f66557b7d5624817b9b447b5 (diff) |
ROA
svn path=/scripts/rpki/roa.py; revision=746
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rpki/roa.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/rpki/roa.py b/scripts/rpki/roa.py new file mode 100644 index 00000000..f6996f4c --- /dev/null +++ b/scripts/rpki/roa.py @@ -0,0 +1,30 @@ +# $Id$ + +from POW._der import * + +# This corresponds to draft-ietf-sidr-roa-format-01, which is a work +# in progress, so this may need updating later. + +class IPAddresses(SequenceOf): + def __init__(self, optional=0, default=''): + SequenceOf.__init__(self, BitString, optional, default) + +class ROAIPAddressFamily(Sequence): + def __init__(self, optional=0, default=''): + self.addressFamily = OctetString() + self.addresses = IPAddresses() + contents = [ self.addressFamily, self.addresses ] + Sequence.__init__(self, contents, optional, default) + +class ROAIPAddrBlocks(SequenceOf): + def __init__(self, optional=0, default=''): + SequenceOf.__init__(self, ROAIPAddressFamily, optional, default) + +class RouteOriginAttestation(Sequence): + def __init__(self, optional=0, default=''): + self.version = Integer(0, chr(0x00)) + self.asID = Integer() + self.exactMatch = Boolean() + self.ipAddrBlocks = ROAIPAddrBlocks() + contents = [ self.version, self.asID, self.exactMatch, self.ipAddrBlocks ] + Sequence.__init__(self, contents, optional, default) |