diff options
author | Rob Austein <sra@hactrn.net> | 2013-01-31 05:04:39 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-01-31 05:04:39 +0000 |
commit | 1dfcb1fc0ae6e9367868c3dab8d38c1bd091dcaf (patch) | |
tree | 9afde39f2bd354e212e709145adaa8763d31ecc0 /rpkid/rpki/x509.py | |
parent | b7c329cb97367a670a36dd9c50a3f761dd2b4963 (diff) | |
parent | 7f49d94068077fabfab83307c3f648b710ab369d (diff) |
Pull from trunk.
svn path=/branches/tk377/; revision=4989
Diffstat (limited to 'rpkid/rpki/x509.py')
-rw-r--r-- | rpkid/rpki/x509.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py index 6f28e6f7..9befb320 100644 --- a/rpkid/rpki/x509.py +++ b/rpkid/rpki/x509.py @@ -693,9 +693,15 @@ class X509(DER_object): if resources is not None: cert.setRFC3779( - asn = ((r.min, r.max) for r in resources.asn), - ipv4 = ((rpki.POW.IPAddress(r.min, 4), rpki.POW.IPAddress(r.max, 4)) for r in resources.v4), - ipv6 = ((rpki.POW.IPAddress(r.min, 6), rpki.POW.IPAddress(r.max, 6)) for r in resources.v6)) + asn = (("inherit" if resources.asn.inherit else + ((r.min, r.max) for r in resources.asn)) + or None), + ipv4 = (("inherit" if resources.v4.inherit else + ((r.min, r.max) for r in resources.v4)) + or None), + ipv6 = (("inherit" if resources.v6.inherit else + ((r.min, r.max) for r in resources.v6)) + or None)) cert.sign(keypair.get_POW(), rpki.POW.SHA256_DIGEST) |