Skip to content

Commit

Permalink
Fixed type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
bkstein committed Dec 5, 2023
1 parent b505f04 commit 0abe441
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cms/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use cipher::{BlockDecryptMut, BlockEncryptMut, Iv, KeyIvInit};
use cms::builder::{
create_signing_time_attribute, ContentEncryptionAlgorithm, EnvelopedDataBuilder,
KeyEncryptionInfo, KeyTransRecipientInfoBuilder, PasswordRecipientInfoBuilder, PwriEncryptor,
Result, SignedDataBuilder, SignerInfoBuilder,
SignedDataBuilder, SignerInfoBuilder,
};
use cms::cert::{CertificateChoices, IssuerAndSerialNumber};
use cms::content_info::ContentInfo;
Expand Down Expand Up @@ -634,7 +634,9 @@ fn test_create_password_recipient_info() {
Ok(encryptor.encrypt_padded_vec_mut::<Pkcs7>(tmp.as_slice()))
}

fn key_derivation_algorithm(&self) -> Result<Option<AlgorithmIdentifierOwned>> {
fn key_derivation_algorithm(
&self,
) -> Result<Option<AlgorithmIdentifierOwned>, cms::builder::Error> {
Ok(Some(AlgorithmIdentifierOwned {
oid: const_oid::db::rfc5911::ID_PBKDF_2,
parameters: Some(Any::new(
Expand All @@ -644,7 +646,9 @@ fn test_create_password_recipient_info() {
}))
}

fn key_encryption_algorithm(&self) -> Result<AlgorithmIdentifierOwned> {
fn key_encryption_algorithm(
&self,
) -> Result<AlgorithmIdentifierOwned, cms::builder::Error> {
Ok(AlgorithmIdentifierOwned {
oid: const_oid::db::rfc5911::ID_AES_128_CBC,
parameters: Some(Any::new(
Expand Down

0 comments on commit 0abe441

Please sign in to comment.