rfc8358.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. from pyasn1.type import univ
  15. from pyasn1_modules import rfc5652
  16. id_ct = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1')
  17. id_ct_asciiTextWithCRLF = id_ct + (27, )
  18. id_ct_epub = id_ct + (39, )
  19. id_ct_htmlWithCRLF = id_ct + (38, )
  20. id_ct_pdf = id_ct + (29, )
  21. id_ct_postscript = id_ct + (30, )
  22. id_ct_utf8TextWithCRLF = id_ct + (37, )
  23. id_ct_xml = id_ct + (28, )
  24. # Map of Content Type OIDs to Content Types is added to the
  25. # ones that are in rfc5652.py
  26. _cmsContentTypesMapUpdate = {
  27. id_ct_asciiTextWithCRLF: univ.OctetString(),
  28. id_ct_epub: univ.OctetString(),
  29. id_ct_htmlWithCRLF: univ.OctetString(),
  30. id_ct_pdf: univ.OctetString(),
  31. id_ct_postscript: univ.OctetString(),
  32. id_ct_utf8TextWithCRLF: univ.OctetString(),
  33. id_ct_xml: univ.OctetString(),
  34. }
  35. rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate)