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