Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
rfc2986.py76 linesDownload Raw Back to pyasn1_modules
1# coding: utf-82#3# This file is part of pyasn1-modules software.4#5# Created by Joel Johnson with asn1ate tool.6# Modified by Russ Housley to add support for opentypes by importing7#   definitions from rfc5280 so that the same maps are used.8#9# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>10# License: http://snmplabs.com/pyasn1/license.html11#12# PKCS #10: Certification Request Syntax Specification13#14# ASN.1 source from:15# https://www.rfc-editor.org/rfc/rfc2986.txt16#17from pyasn1.type import namedtype18from pyasn1.type import tag19from pyasn1.type import univ20 21from pyasn1_modules import rfc528022 23MAX = float('inf')24 25 26AttributeType = rfc5280.AttributeType27 28AttributeValue = rfc5280.AttributeValue29 30AttributeTypeAndValue = rfc5280.AttributeTypeAndValue31 32Attribute = rfc5280.Attribute33 34RelativeDistinguishedName = rfc5280.RelativeDistinguishedName35 36RDNSequence = rfc5280.RDNSequence37 38Name = rfc5280.Name39 40AlgorithmIdentifier = rfc5280.AlgorithmIdentifier41 42SubjectPublicKeyInfo = rfc5280.SubjectPublicKeyInfo43 44 45class Attributes(univ.SetOf):46    pass47 48 49Attributes.componentType = Attribute()50 51 52class CertificationRequestInfo(univ.Sequence):53    pass54 55 56CertificationRequestInfo.componentType = namedtype.NamedTypes(57    namedtype.NamedType('version', univ.Integer()),58    namedtype.NamedType('subject', Name()),59    namedtype.NamedType('subjectPKInfo', SubjectPublicKeyInfo()),60    namedtype.NamedType('attributes',61                        Attributes().subtype(implicitTag=tag.Tag(62                            tag.tagClassContext, tag.tagFormatSimple, 0))63    )64)65 66 67class CertificationRequest(univ.Sequence):68    pass69 70 71CertificationRequest.componentType = namedtype.NamedTypes(72    namedtype.NamedType('certificationRequestInfo', CertificationRequestInfo()),73    namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),74    namedtype.NamedType('signature', univ.BitString())75)76 
codekingpro/portable-devtools · Team Ai