summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-09-29 12:10:54 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-09-29 12:10:54 +0200
commit81d21ecab7fbe05c5bff3dee66aa737562d8f6e1 (patch)
treee2d6605349af428cee34dd30beeda70df846ebfc
parent96b89aa5a26d75c767691aeb07dc4652d1f5e446 (diff)
openpgp: Add comment.
-rw-r--r--openpgp/src/cert/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs
index 81f8740b..cf1d2739 100644
--- a/openpgp/src/cert/mod.rs
+++ b/openpgp/src/cert/mod.rs
@@ -227,6 +227,11 @@ fn canonical_signature_order(a: Option<time::SystemTime>, b: Option<time::System
a.cmp(&b).reverse()
}
+/// Compares two signatures by creation time using the MPIs as tie
+/// breaker.
+///
+/// Useful to sort signatures so that the most recent ones are at the
+/// front.
fn sig_cmp(a: &Signature, b: &Signature) -> Ordering {
match canonical_signature_order(a.signature_creation_time(),
b.signature_creation_time()) {