Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
rfc3820.py66 linesDownload Raw Back to pyasn1_modules
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# Diffie-Hellman Key Agreement10#11# ASN.1 source from:12# https://www.rfc-editor.org/rfc/rfc3820.txt13#14 15from pyasn1.type import namedtype16from pyasn1.type import univ17 18from pyasn1_modules import rfc528019 20 21 22class ProxyCertPathLengthConstraint(univ.Integer):23    pass24 25 26class ProxyPolicy(univ.Sequence):27    componentType = namedtype.NamedTypes(28        namedtype.NamedType('policyLanguage', univ.ObjectIdentifier()),29        namedtype.OptionalNamedType('policy', univ.OctetString())30    )31 32 33class ProxyCertInfoExtension(univ.Sequence):34    componentType = namedtype.NamedTypes(35        namedtype.OptionalNamedType('pCPathLenConstraint',36            ProxyCertPathLengthConstraint()),37        namedtype.NamedType('proxyPolicy', ProxyPolicy())38    )39 40 41id_pkix = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, ))42 43 44id_pe = id_pkix + (1, )45 46id_pe_proxyCertInfo = id_pe + (14, )47 48 49id_ppl = id_pkix + (21, )50 51id_ppl_anyLanguage = id_ppl + (0, )52 53id_ppl_inheritAll = id_ppl + (1, )54 55id_ppl_independent = id_ppl + (2, )56 57 58# Map of Certificate Extension OIDs to Extensions added to the59# ones that are in rfc5280.py60 61_certificateExtensionsMapUpdate = {62    id_pe_proxyCertInfo: ProxyCertInfoExtension(),	63}64 65rfc5280.certificateExtensionsMap.update(_certificateExtensionsMapUpdate)66 
codekingpro/portable-devtools · Team Ai