rfc5913.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # This file is part of pyasn1-modules software.
  3. #
  4. # Created by Russ Housley with assistance from asn1ate v.0.6.0.
  5. #
  6. # Copyright (c) 2019, Vigil Security, LLC
  7. # License: http://snmplabs.com/pyasn1/license.html
  8. #
  9. # Authority Clearance Constraints Certificate Extension
  10. #
  11. # ASN.1 source from:
  12. # https://www.rfc-editor.org/rfc/rfc5913.txt
  13. # https://www.rfc-editor.org/errata/eid5890
  14. #
  15. from pyasn1.type import constraint
  16. from pyasn1.type import univ
  17. from pyasn1_modules import rfc5280
  18. from pyasn1_modules import rfc5755
  19. MAX = float('inf')
  20. # Authority Clearance Constraints Certificate Extension
  21. id_pe_clearanceConstraints = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.21')
  22. id_pe_authorityClearanceConstraints = id_pe_clearanceConstraints
  23. class AuthorityClearanceConstraints(univ.SequenceOf):
  24. componentType = rfc5755.Clearance()
  25. subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
  26. # Map of Certificate Extension OIDs to Extensions added to the
  27. # ones that are in rfc5280.py
  28. _certificateExtensionsMapUpdate = {
  29. id_pe_clearanceConstraints: AuthorityClearanceConstraints(),
  30. }
  31. rfc5280.certificateExtensionsMap.update(_certificateExtensionsMapUpdate)