summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/src/parse/stream.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-04-03 17:09:18 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-04-03 17:54:32 +0200
commitda206f3817b98dcf1270f620dac3a0995601d552 (patch)
tree2efcd0c67cef40b60463e60fbe3440add2ae451b /openpgp-ffi/src/parse/stream.rs
parentc775f30e1f0ec9e775466f2ece0f8efae29ad290 (diff)
openpgp: Reverse the order of signature groups.
- Previously, we reported the signature groups in the order encountered in the message. Reverse this order in preparation to reporting the message structure, which is the path from the start of the message to the literal data packet.
Diffstat (limited to 'openpgp-ffi/src/parse/stream.rs')
-rw-r--r--openpgp-ffi/src/parse/stream.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs
index baf0ae05..d78ded86 100644
--- a/openpgp-ffi/src/parse/stream.rs
+++ b/openpgp-ffi/src/parse/stream.rs
@@ -120,8 +120,8 @@ fn pgp_verification_results_at_level<'a>(results: *const VerificationResults<'a>
// The size of VerificationResult is not known in C. Convert from
// an array of VerificationResult to an array of
// VerificationResult refs.
- *r = results.results[level].as_ptr();
- *r_count = results.results[level].len();
+ *r = results.results[results.results.len() - level - 1].as_ptr();
+ *r_count = results.results[results.results.len() - level - 1].len();
}
/// Returns the verification result code.