From 7cd04da69ff86db615b714df85b5d41720f9327b Mon Sep 17 00:00:00 2001 From: Bernd Krietenstein Date: Thu, 7 Dec 2023 11:53:20 +0100 Subject: [PATCH] Fixed key derivation for PwriEncryptor in test --- cms/tests/builder.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cms/tests/builder.rs b/cms/tests/builder.rs index efe689b89..b0e6d7bda 100644 --- a/cms/tests/builder.rs +++ b/cms/tests/builder.rs @@ -637,12 +637,10 @@ fn test_create_password_recipient_info() { fn key_derivation_algorithm( &self, ) -> Result, cms::builder::Error> { + let key_derivation_params_der = self.key_derivation_params.to_der()?; Ok(Some(AlgorithmIdentifierOwned { oid: const_oid::db::rfc5911::ID_PBKDF_2, - parameters: Some(Any::new( - der::Tag::Sequence, - self.key_derivation_params.to_der()?, - )?), + parameters: Some(Any::from_der(key_derivation_params_der.as_slice())?), })) }