Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
rfc7585.py51 linesDownload Raw Back to pyasn1_modules
1#2# This file is part of pyasn1-modules software.3#4# Created by Russ Housley with some assistance from asn1ate v.0.6.0.5#6# Copyright (c) 2019, Vigil Security, LLC7# License: http://snmplabs.com/pyasn1/license.html8#9# Network Access Identifier (NAI) Realm Name for Certificates10#11# ASN.1 source from:12# https://www.rfc-editor.org/rfc/rfc7585.txt13#14 15from pyasn1.type import char16from pyasn1.type import constraint17from pyasn1.type import univ18 19from pyasn1_modules import rfc528020 21 22# NAI Realm Name for Certificates23 24id_pkix = univ.ObjectIdentifier('1.3.6.1.5.5.7')25 26id_on = id_pkix + (8, )27 28id_on_naiRealm = id_on + (8, )29 30 31ub_naiRealm_length = univ.Integer(255)32 33 34class NAIRealm(char.UTF8String):35    subtypeSpec = constraint.ValueSizeConstraint(1, ub_naiRealm_length)36 37 38naiRealm = rfc5280.AnotherName()39naiRealm['type-id'] = id_on_naiRealm40naiRealm['value'] = NAIRealm()41 42 43# Map of Other Name OIDs to Other Name is added to the44# ones that are in rfc5280.py45 46_anotherNameMapUpdate = {47    id_on_naiRealm: NAIRealm(),48}49 50rfc5280.anotherNameMap.update(_anotherNameMapUpdate)51 
codekingpro/portable-devtools · Team Ai