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>(
775
775
// in the signed data, then the provided content. If None of these are available, raise
776
776
// an error. TODO: what should the order be?
777
777
let data = match signer_info. authenticated_attributes {
778
- Some ( attrs) => & asn1:: write_single ( & attrs) ?,
778
+ Some ( attrs) => Cow :: Owned ( asn1:: write_single ( & attrs) ?) ,
779
779
None => match content {
780
- Some ( data) => data,
780
+ Some ( data) => Cow :: Borrowed ( data) ,
781
781
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 ( ) ) ,
783
783
_ => {
784
784
return Err ( CryptographyError :: from (
785
785
pyo3:: exceptions:: PyValueError :: new_err (
@@ -797,7 +797,7 @@ fn verify_der<'p>(
797
797
certificate. call_method0 ( pyo3:: intern!( py, "public_key" ) ) ?,
798
798
& signer_info. digest_encryption_algorithm ,
799
799
signer_info. encrypted_digest ,
800
- data,
800
+ & data,
801
801
) ?;
802
802
803
803
// Verify the certificate
You can’t perform that action at this time.
0 commit comments