[apkverify] Remove the Ord implementation for SignatureAlgorithmID
As SignatureAlgorithmID is now part of the public API of apkverify,
this cl removes the custom implementation of Ord so that the
signature algorithm's equality could be compared according to
their ID.
Test: libidsig.test libapkverify.integration_test
Bug: 246254355
Change-Id: Id5d88a8ec7de1ec09f354b8ea1357feb82e08f05
diff --git a/libs/apkverify/src/v3.rs b/libs/apkverify/src/v3.rs
index 76617e1..be74f20 100644
--- a/libs/apkverify/src/v3.rs
+++ b/libs/apkverify/src/v3.rs
@@ -143,7 +143,11 @@
.signatures
.iter()
.filter(|sig| SignatureAlgorithmID::from_u32(sig.signature_algorithm_id).is_some())
- .max_by_key(|sig| SignatureAlgorithmID::from_u32(sig.signature_algorithm_id).unwrap())
+ .max_by_key(|sig| {
+ SignatureAlgorithmID::from_u32(sig.signature_algorithm_id)
+ .unwrap()
+ .to_content_digest_algorithm()
+ })
.context("No supported signatures found")?)
}