rfc8360.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # This file is part of pyasn1-modules software.
  3. #
  4. # Created by Russ Housley.
  5. #
  6. # Copyright (c) 2019, Vigil Security, LLC
  7. # License: http://snmplabs.com/pyasn1/license.html
  8. #
  9. # Resource Public Key Infrastructure (RPKI) Validation Reconsidered
  10. #
  11. # ASN.1 source from:
  12. # https://www.rfc-editor.org/rfc/rfc8360.txt
  13. # https://www.rfc-editor.org/errata/eid5870
  14. #
  15. from pyasn1.type import univ
  16. from pyasn1_modules import rfc3779
  17. from pyasn1_modules import rfc5280
  18. # IP Address Delegation Extension V2
  19. id_pe_ipAddrBlocks_v2 = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.28')
  20. IPAddrBlocks = rfc3779.IPAddrBlocks
  21. # Autonomous System Identifier Delegation Extension V2
  22. id_pe_autonomousSysIds_v2 = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.29')
  23. ASIdentifiers = rfc3779.ASIdentifiers
  24. # Map of Certificate Extension OIDs to Extensions is added to the
  25. # ones that are in rfc5280.py
  26. _certificateExtensionsMapUpdate = {
  27. id_pe_ipAddrBlocks_v2: IPAddrBlocks(),
  28. id_pe_autonomousSysIds_v2: ASIdentifiers(),
  29. }
  30. rfc5280.certificateExtensionsMap.update(_certificateExtensionsMapUpdate)