File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -775,11 +775,11 @@ fn verify_der<'p>(
775775 // in the signed data, then the provided content. If None of these are available, raise
776776 // an error. TODO: what should the order be?
777777 let data = match signer_info. authenticated_attributes {
778- Some ( attrs) => & asn1:: write_single ( & attrs) ?,
778+ Some ( attrs) => Cow :: Owned ( asn1:: write_single ( & attrs) ?) ,
779779 None => match content {
780- Some ( data) => data,
780+ Some ( data) => Cow :: Borrowed ( data) ,
781781 None => match signed_data. content_info . content {
782- pkcs7:: Content :: Data ( Some ( data) ) => data. into_inner ( ) ,
782+ pkcs7:: Content :: Data ( Some ( data) ) => Cow :: Borrowed ( data. into_inner ( ) ) ,
783783 _ => {
784784 return Err ( CryptographyError :: from (
785785 pyo3:: exceptions:: PyValueError :: new_err (
@@ -797,7 +797,7 @@ fn verify_der<'p>(
797797 certificate. call_method0 ( pyo3:: intern!( py, "public_key" ) ) ?,
798798 & signer_info. digest_encryption_algorithm ,
799799 signer_info. encrypted_digest ,
800- data,
800+ & data,
801801 ) ?;
802802
803803 // Verify the certificate
You can’t perform that action at this time.
0 commit comments