Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
rfc4985.py50 linesDownload Raw Back to pyasn1_modules
1#2# This file is part of pyasn1-modules software.3#4# Created by Russ Housley.5#6# Copyright (c) 2019, Vigil Security, LLC7# License: http://snmplabs.com/pyasn1/license.html8#9# Expression of Service Names in X.509 Certificates10#11# ASN.1 source from:12# https://www.rfc-editor.org/rfc/rfc4985.txt13#14 15from pyasn1.type import char16from pyasn1.type import constraint17from pyasn1.type import univ18 19from pyasn1_modules import rfc528020 21MAX = float('inf')22 23 24# As specified in Appendix A.2 of RFC 498525 26id_pkix = rfc5280.id_pkix27 28id_on = id_pkix + (8, )29 30id_on_dnsSRV = id_on + (7, )31 32 33class SRVName(char.IA5String):34    subtypeSpec = constraint.ValueSizeConstraint(1, MAX)35 36 37srvName = rfc5280.AnotherName()38srvName['type-id'] = id_on_dnsSRV39srvName['value'] = SRVName()40 41 42# Map of Other Name OIDs to Other Name is added to the43# ones that are in rfc5280.py44 45_anotherNameMapUpdate = {46    id_on_dnsSRV: SRVName(),47}48 49rfc5280.anotherNameMap.update(_anotherNameMapUpdate)50 
codekingpro/portable-devtools · Team Ai