Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pyasn1_modules/rfc2314.py: 100%
13 statements
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-26 06:04 +0000
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-26 06:04 +0000
1#
2# This file is part of pyasn1-modules software.
3#
4# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
5# License: http://snmplabs.com/pyasn1/license.html
6#
7# PKCS#10 syntax
8#
9# ASN.1 source from:
10# http://tools.ietf.org/html/rfc2314
11#
12# Sample captures could be obtained with "openssl req" command
13#
14from pyasn1_modules.rfc2459 import *
17class Attributes(univ.SetOf):
18 componentType = Attribute()
21class Version(univ.Integer):
22 pass
25class CertificationRequestInfo(univ.Sequence):
26 componentType = namedtype.NamedTypes(
27 namedtype.NamedType('version', Version()),
28 namedtype.NamedType('subject', Name()),
29 namedtype.NamedType('subjectPublicKeyInfo', SubjectPublicKeyInfo()),
30 namedtype.NamedType('attributes',
31 Attributes().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0)))
32 )
35class Signature(univ.BitString):
36 pass
39class SignatureAlgorithmIdentifier(AlgorithmIdentifier):
40 pass
43class CertificationRequest(univ.Sequence):
44 componentType = namedtype.NamedTypes(
45 namedtype.NamedType('certificationRequestInfo', CertificationRequestInfo()),
46 namedtype.NamedType('signatureAlgorithm', SignatureAlgorithmIdentifier()),
47 namedtype.NamedType('signature', Signature())
48 )