codekingpro/portable-devtools
114k
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, LLC7# License: http://snmplabs.com/pyasn1/license.html8#9# Certificate Extensions and Attributes Supporting Authentication10# in PPP and Wireless LAN Networks11#12# ASN.1 source from:13# https://www.rfc-editor.org/rfc/rfc3770.txt14# https://www.rfc-editor.org/errata/eid23415#16 17from pyasn1.type import constraint18from pyasn1.type import univ19 20from pyasn1_modules import rfc528021 22 23MAX = float('inf')24 25 26# Extended Key Usage Values27 28id_kp_eapOverLAN = univ.ObjectIdentifier('1.3.6.1.5.5.7.3.14')29 30id_kp_eapOverPPP = univ.ObjectIdentifier('1.3.6.1.5.5.7.3.13')31 32 33# Wireless LAN SSID Extension34 35id_pe_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.13')36 37 38class SSID(univ.OctetString):39 pass40 41SSID.subtypeSpec = constraint.ValueSizeConstraint(1, 32)42 43 44class SSIDList(univ.SequenceOf):45 pass46 47SSIDList.componentType = SSID()48SSIDList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)49 50 51# Wireless LAN SSID Attribute Certificate Attribute52# Uses same syntax as the certificate extension: SSIDList53# Correction for https://www.rfc-editor.org/errata/eid23454 55id_aca_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.10.7')56 57 58# Map of Certificate Extension OIDs to Extensions59# To be added to the ones that are in rfc5280.py60 61_certificateExtensionsMap = {62 id_pe_wlanSSID: SSIDList(),63}64 65rfc5280.certificateExtensionsMap.update(_certificateExtensionsMap)66 67 68# Map of AttributeType OIDs to AttributeValue added to the69# ones that are in rfc5280.py70 71_certificateAttributesMapUpdate = {72 id_aca_wlanSSID: SSIDList(),73}74 75rfc5280.certificateAttributesMap.update(_certificateAttributesMapUpdate)76 