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# Experiment for Hash Functions with Parameters in the CMS 10# 11# ASN.1 source from: 12# https://www.rfc-editor.org/rfc/rfc6210.txt 13# 14 15from pyasn1.type import constraint 16from pyasn1.type import univ 17 18from pyasn1_modules import rfc5280 19 20 21id_alg_MD5_XOR_EXPERIMENT = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.13') 22 23 24class MD5_XOR_EXPERIMENT(univ.OctetString): 25 pass 26 27MD5_XOR_EXPERIMENT.subtypeSpec = constraint.ValueSizeConstraint(64, 64) 28 29 30mda_xor_md5_EXPERIMENT = rfc5280.AlgorithmIdentifier() 31mda_xor_md5_EXPERIMENT['algorithm'] = id_alg_MD5_XOR_EXPERIMENT 32mda_xor_md5_EXPERIMENT['parameters'] = MD5_XOR_EXPERIMENT() 33 34 35# Map of Algorithm Identifier OIDs to Parameters added to the 36# ones that are in rfc5280.py. 37 38_algorithmIdentifierMapUpdate = { 39 id_alg_MD5_XOR_EXPERIMENT: MD5_XOR_EXPERIMENT(), 40} 41 42rfc5280.algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate) 43