You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

64 lines
1.4 KiB

  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. # Certificate Extensions and Attributes Supporting Authentication
  10. # in PPP and Wireless LAN Networks
  11. #
  12. # ASN.1 source from:
  13. # https://www.rfc-editor.org/rfc/rfc3770.txt
  14. #
  15. from pyasn1.type import constraint
  16. from pyasn1.type import univ
  17. from pyasn1_modules import rfc5280
  18. MAX = float('inf')
  19. # Extended Key Usage Values
  20. id_kp_eapOverLAN = univ.ObjectIdentifier('1.3.6.1.5.5.7.3.14')
  21. id_kp_eapOverPPP = univ.ObjectIdentifier('1.3.6.1.5.5.7.3.13')
  22. # Wireless LAN SSID Extension
  23. id_pe_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.13')
  24. class SSID(univ.OctetString):
  25. pass
  26. SSID.subtypeSpec = constraint.ValueSizeConstraint(1, 32)
  27. class SSIDList(univ.SequenceOf):
  28. pass
  29. SSIDList.componentType = SSID()
  30. SSIDList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
  31. # Wireless LAN SSID Attribute Certificate Attribute
  32. # Uses same syntax as the certificate extension: SSIDList
  33. id_aca_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.10.6')
  34. # Map of Certificate Extension OIDs to Extensions
  35. # To be added to the ones that are in rfc5280.py
  36. _certificateExtensionsMap = {
  37. id_pe_wlanSSID: SSIDList(),
  38. }
  39. rfc5280.certificateExtensionsMap.update(_certificateExtensionsMap)