summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-07-24 12:00:26 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-07-24 16:28:09 +0200
commite7667b8d91edb100a696fb6e6ac72ba31fb79ed2 (patch)
tree4eecaafc6c0fb254e5b5be8129160bb73b4027ca
parent1574c118a6b5b0e340c6176742ffceed7989a9c7 (diff)
openpgp: Clarify what happens when verifying detached signatures.
- See #471.
-rw-r--r--openpgp/src/parse/stream.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index c1d5269d..980ef37f 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -742,6 +742,13 @@ pub trait VerificationHelper {
/// [`Verifier::message_processed`]: struct.Verifier.html#method.message_processed
/// [`Decryptor::message_processed`]: struct.Decryptor.html#method.message_processed
///
+ /// When verifying a detached signature using the
+ /// [`DetachedVerifier`], this method will be called with a
+ /// [`MessageStructure`] containing exactly one layer, a signature
+ /// group.
+ ///
+ /// [`DetachedVerifier`]: struct.DetachedVerifier.html
+ ///
/// # Examples
///
/// This example demonstrates how to verify that the message is an
@@ -1276,9 +1283,14 @@ impl<'a, H: VerificationHelper> io::Read for Verifier<'a, H> {
/// [`Parse`]: ../trait.Parse.html
///
/// See [`GoodChecksum`] for what it means for a signature to be
-/// considered valid.
+/// considered valid. When the signature(s) are processed,
+/// [`VerificationHelper::check`] will be called with a
+/// [`MessageStructure`] containing exactly one layer, a signature
+/// group.
///
/// [`GoodChecksum`]: struct.GoodChecksum.html
+/// [`VerificationHelper::check`]: trait.VerificationHelper.html#tymethod.check
+/// [`MessageStructure`]: struct.MessageStructure.html
///
/// # Examples
///
@@ -1432,8 +1444,13 @@ impl<'a> DetachedVerifierBuilder<'a> {
/// Signature verifications are done under the given `policy` and
/// relative to time `time`, or the current time, if `time` is
/// `None`. `helper` is the [`VerificationHelper`] to use.
+ /// [`VerificationHelper::check`] will be called with a
+ /// [`MessageStructure`] containing exactly one layer, a signature
+ /// group.
///
/// [`VerificationHelper`]: trait.VerificationHelper.html
+ /// [`VerificationHelper::check`]: trait.VerificationHelper.html#tymethod.check
+ /// [`MessageStructure`]: struct.MessageStructure.html
///
/// # Examples
///