1# 2# This file is part of pyasn1-modules software. 3# 4# Created by Russ Housley with assistance from asn1ate v.0.6.0. 5# Modified by Russ Housley to add map for use with opentypes. 6# 7# Copyright (c) 2019, Vigil Security, LLC 8# License: http://snmplabs.com/pyasn1/license.html 9# 10# Additional CMS Revocation Information Choices 11# 12# ASN.1 source from: 13# https://www.rfc-editor.org/rfc/rfc5940.txt 14# 15 16from pyasn1.type import namedtype 17from pyasn1.type import tag 18from pyasn1.type import univ 19 20from pyasn1_modules import rfc2560 21from pyasn1_modules import rfc5652 22 23 24# RevocationInfoChoice for OCSP response: 25# The OID is included in otherRevInfoFormat, and 26# signed OCSPResponse is included in otherRevInfo 27 28id_ri_ocsp_response = univ.ObjectIdentifier('1.3.6.1.5.5.7.16.2') 29 30OCSPResponse = rfc2560.OCSPResponse 31 32 33# RevocationInfoChoice for SCVP request/response: 34# The OID is included in otherRevInfoFormat, and 35# SCVPReqRes is included in otherRevInfo 36 37id_ri_scvp = univ.ObjectIdentifier('1.3.6.1.5.5.7.16.4') 38 39ContentInfo = rfc5652.ContentInfo 40 41class SCVPReqRes(univ.Sequence): 42 pass 43 44SCVPReqRes.componentType = namedtype.NamedTypes( 45 namedtype.OptionalNamedType('request', ContentInfo().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))), 46 namedtype.NamedType('response', ContentInfo()) 47) 48 49 50# Map of Revocation Info Format OIDs to Revocation Info Format 51# To be added to the ones that are in rfc5652.py 52 53otherRevInfoFormatMapUpdate = { 54 id_ri_ocsp_response: OCSPResponse(), 55 id_ri_scvp: SCVPReqRes(), 56} 57