Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
rfc8398.py53 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# Internationalized Email Addresses in X.509 Certificates10#11# ASN.1 source from:12# https://www.rfc-editor.org/rfc/rfc8398.txt13# https://www.rfc-editor.org/errata/eid541814#15 16from pyasn1.type import char17from pyasn1.type import constraint18from pyasn1.type import univ19 20from pyasn1_modules import rfc528021 22MAX = float('inf')23 24 25# SmtpUTF8Mailbox contains Mailbox as specified in Section 3.3 of RFC 653126 27id_pkix = rfc5280.id_pkix28 29id_on = id_pkix + (8, )30 31id_on_SmtpUTF8Mailbox = id_on + (9, )32 33 34class SmtpUTF8Mailbox(char.UTF8String):35    pass36 37SmtpUTF8Mailbox.subtypeSpec = constraint.ValueSizeConstraint(1, MAX)38 39 40on_SmtpUTF8Mailbox = rfc5280.AnotherName()41on_SmtpUTF8Mailbox['type-id'] = id_on_SmtpUTF8Mailbox42on_SmtpUTF8Mailbox['value'] = SmtpUTF8Mailbox()43 44 45# Map of Other Name OIDs to Other Name is added to the46# ones that are in rfc5280.py47 48_anotherNameMapUpdate = {49    id_on_SmtpUTF8Mailbox: SmtpUTF8Mailbox(),50}51 52rfc5280.anotherNameMap.update(_anotherNameMapUpdate)53 
codekingpro/portable-devtools · Team Ai