• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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# https://www.rfc-editor.org/errata/eid234
15#
16
17from pyasn1.type import constraint
18from pyasn1.type import univ
19
20from pyasn1_modules import rfc5280
21
22
23MAX = float('inf')
24
25
26# Extended Key Usage Values
27
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 Extension
34
35id_pe_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.13')
36
37
38class SSID(univ.OctetString):
39    pass
40
41SSID.subtypeSpec = constraint.ValueSizeConstraint(1, 32)
42
43
44class SSIDList(univ.SequenceOf):
45    pass
46
47SSIDList.componentType = SSID()
48SSIDList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
49
50
51# Wireless LAN SSID Attribute Certificate Attribute
52# Uses same syntax as the certificate extension: SSIDList
53# Correction for https://www.rfc-editor.org/errata/eid234
54
55id_aca_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.10.7')
56
57
58# Map of Certificate Extension OIDs to Extensions
59# To be added to the ones that are in rfc5280.py
60
61_certificateExtensionsMap = {
62    id_pe_wlanSSID: SSIDList(),
63}
64
65rfc5280.certificateExtensionsMap.update(_certificateExtensionsMap)
66
67
68# Map of AttributeType OIDs to AttributeValue added to the
69# ones that are in rfc5280.py
70
71_certificateAttributesMapUpdate = {
72    id_aca_wlanSSID: SSIDList(),
73}
74
75rfc5280.certificateAttributesMap.update(_certificateAttributesMapUpdate)
76