1 #
2 # This file is part of pyasn1-modules software.
3 #
4 # Created by Russ Housley.
5 #
6 # Copyright (c) 2019, Vigil Security, LLC
7 # License: http://snmplabs.com/pyasn1/license.html
8 #
9 # Digital Signatures on Internet-Draft Documents
10 #
11 # ASN.1 source from:
12 # https://www.rfc-editor.org/rfc/rfc8358.txt
13 #
14 
15 from pyasn1.type import univ
16 
17 from pyasn1_modules import rfc5652
18 
19 
20 id_ct = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1')
21 
22 id_ct_asciiTextWithCRLF = id_ct + (27, )
23 
24 id_ct_epub = id_ct + (39, )
25 
26 id_ct_htmlWithCRLF = id_ct + (38, )
27 
28 id_ct_pdf = id_ct + (29, )
29 
30 id_ct_postscript = id_ct + (30, )
31 
32 id_ct_utf8TextWithCRLF = id_ct + (37, )
33 
34 id_ct_xml = id_ct + (28, )
35 
36 
37 # Map of Content Type OIDs to Content Types is added to the
38 # ones that are in rfc5652.py
39 
40 _cmsContentTypesMapUpdate = {
41     id_ct_asciiTextWithCRLF: univ.OctetString(),
42     id_ct_epub: univ.OctetString(),
43     id_ct_htmlWithCRLF: univ.OctetString(),
44     id_ct_pdf: univ.OctetString(),
45     id_ct_postscript: univ.OctetString(),
46     id_ct_utf8TextWithCRLF: univ.OctetString(),
47     id_ct_xml: univ.OctetString(),
48 }
49 
50 rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
51