# coding: utf-8 """ ASN.1 type classes for certificate signing requests (CSR). Exports the following items: - CertificatationRequest() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function from .algos import SignedDigestAlgorithm from .core import ( Any, Integer, ObjectIdentifier, OctetBitString, Sequence, SetOf, ) from .keys import PublicKeyInfo from .x509 import DirectoryString, Extensions, Name # The structures in this file are taken from https://tools.ietf.org/html/rfc2986 # and https://tools.ietf.org/html/rfc2985 class Version(Integer): _map = { 0: 'v1', } class CSRAttributeType(ObjectIdentifier): _map = { '1.2.840.113549.1.9.7': 'challenge_password', '1.2.840.113549.1.9.9': 'extended_certificate_attributes', '1.2.840.113549.1.9.14': 'extension_request', } class SetOfDirectoryString(SetOf): _child_spec = DirectoryString class Attribute(Sequence): _fields = [ ('type', ObjectIdentifier), ('values', SetOf, {'spec': Any}), ] class SetOfAttributes(SetOf): _child_spec = Attribute class SetOfExtensions(SetOf): _child_spec = Extensions class CRIAttribute(Sequence): _fields = [ ('type', CSRAttributeType), ('values', Any), ] _oid_pair = ('type', 'values') _oid_specs = { 'challenge_password': SetOfDirectoryString, 'extended_certificate_attributes': SetOfAttributes, 'extension_request': SetOfExtensions, } class CRIAttributes(SetOf): _child_spec = CRIAttribute class CertificationRequestInfo(Sequence): _fields = [ ('version', Version), ('subject', Name), ('subject_pk_info', PublicKeyInfo), ('attributes', CRIAttributes, {'implicit': 0, 'optional': True}), ] class CertificationRequest(Sequence): _fields = [ ('certification_request_info', CertificationRequestInfo), ('signature_algorithm', SignedDigestAlgorithm), ('signature', OctetBitString), ]
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
_perf | Folder | 0755 |
|
|
__init__.py | File | 209 B | 0644 |
|
_elliptic_curve.py | File | 9.2 KB | 0644 |
|
_errors.py | File | 967 B | 0644 |
|
_ffi.py | File | 738 B | 0644 |
|
_inet.py | File | 4.55 KB | 0644 |
|
_int.py | File | 4.51 KB | 0644 |
|
_iri.py | File | 8.43 KB | 0644 |
|
_ordereddict.py | File | 4.43 KB | 0644 |
|
_teletex_codec.py | File | 4.93 KB | 0644 |
|
_types.py | File | 939 B | 0644 |
|
algos.py | File | 33.3 KB | 0644 |
|
cms.py | File | 24.53 KB | 0644 |
|
core.py | File | 153.57 KB | 0644 |
|
crl.py | File | 15.73 KB | 0644 |
|
csr.py | File | 2.09 KB | 0644 |
|
keys.py | File | 34.36 KB | 0644 |
|
ocsp.py | File | 17.38 KB | 0644 |
|
parser.py | File | 8.93 KB | 0644 |
|
pdf.py | File | 2.2 KB | 0644 |
|
pem.py | File | 6 KB | 0644 |
|
pkcs12.py | File | 4.46 KB | 0644 |
|
tsp.py | File | 7.64 KB | 0644 |
|
util.py | File | 17.62 KB | 0644 |
|
version.py | File | 154 B | 0644 |
|
x509.py | File | 90.14 KB | 0644 |
|