- sbox = "Gost28147_tc26_ParamZ"
- content_info, tail = ContentInfo().decode(content_info_raw)
- self.assertSequenceEqual(tail, b"")
- enveloped_data, tail = EnvelopedData().decode(bytes(content_info["content"]))
+ sbox = "id-tc26-gost-28147-param-Z"
+ content_info, tail = ContentInfo().decode(content_info_raw, ctx={
+ "defines_by_path": [
+ (
+ (
+ "content",
+ DecodePathDefBy(id_envelopedData),
+ "recipientInfos",
+ any,
+ "ktri",
+ "encryptedKey",
+ DecodePathDefBy(spki_algorithm),
+ "transportParameters",
+ "ephemeralPublicKey",
+ "algorithm",
+ "algorithm",
+ ),
+ (
+ (
+ ("..", "subjectPublicKey"),
+ {
+ id_tc26_gost3410_2012_256: OctetString(),
+ id_tc26_gost3410_2012_512: OctetString(),
+ },
+ ),
+ ),
+ ) for spki_algorithm in (
+ id_tc26_gost3410_2012_256,
+ id_tc26_gost3410_2012_512,
+ )
+ ],
+ })