0 | |
commit 28d60e85ee3c611635a7ad92e162f9c1266f94db
|
1 | |
gpg: Signature made Fri 27 Aug 2021 10:37:09 AM CEST
|
|
0 |
commit 4f608ae26ef6e5437b14b75f6d571e5a3281ef66
|
|
1 |
gpg: Signature made Mon 30 Aug 2021 12:27:48 PM CEST
|
2 | 2 |
gpg: using EDDSA key D1FE45FB978F6B65C4C0B9AA686F55B4AB2B3386
|
3 | 3 |
gpg: Good signature from "Justus Winter (Code Signing Key) <justus@sequoia-pgp.org>" [ultimate]
|
4 | 4 |
gpg: aka "Justus Winter (Code Signing Key) <justus@pep-project.org>" [ultimate]
|
|
8 | 8 |
xxx debugging parse::stream::test::decryptor
|
9 | 9 |
|
10 | 10 |
diff --git a/src/parse/stream.rs b/src/parse/stream.rs
|
11 | |
index 4058cc9f..1df0419d 100644
|
|
11 |
index 4058cc9f..8ff204f6 100644
|
12 | 12 |
--- a/src/parse/stream.rs
|
13 | 13 |
+++ b/src/parse/stream.rs
|
14 | |
@@ -3226,8 +3226,23 @@ mod test {
|
|
14 |
@@ -2361,6 +2361,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
|
|
15 |
let mut skesks: Vec<packet::SKESK> = Vec::new();
|
|
16 |
|
|
17 |
while let PacketParserResult::Some(mut pp) = ppr {
|
|
18 |
+ dbg!((pp.packet.tag(), pp.packet.kind()));
|
|
19 |
v.policy.packet(&pp.packet)?;
|
|
20 |
v.helper.inspect(&pp)?;
|
|
21 |
|
|
22 |
@@ -2376,7 +2377,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
|
|
23 |
.into());
|
|
24 |
}
|
|
25 |
} else {
|
|
26 |
- if let Err(err) = pp.possible_message() {
|
|
27 |
+ if let Err(err) = dbg!(pp.possible_message()) {
|
|
28 |
t!("Malformed message: {}", err);
|
|
29 |
return Err(err.context("Malformed OpenPGP message"));
|
|
30 |
}
|
|
31 |
@@ -2478,8 +2479,8 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
|
|
32 |
|
|
33 |
// We can only get here if we didn't encounter a literal data
|
|
34 |
// packet.
|
|
35 |
- Err(Error::MalformedMessage(
|
|
36 |
- "Malformed OpenPGP message".into()).into())
|
|
37 |
+ Err(dbg!(Error::MalformedMessage(
|
|
38 |
+ "Malformed OpenPGP message".into()).into()))
|
|
39 |
}
|
|
40 |
|
|
41 |
/// Verifies the given data in detached verification mode.
|
|
42 |
@@ -3219,6 +3220,7 @@ mod test {
|
|
43 |
|
|
44 |
#[test]
|
|
45 |
fn decryptor() -> Result<()> {
|
|
46 |
+ eprintln!("Now is {:?}", std::time::SystemTime::now());
|
|
47 |
let p = P::new();
|
|
48 |
for alg in &[
|
|
49 |
"rsa", "elg", "cv25519", "cv25519.unclamped",
|
|
50 |
@@ -3226,8 +3228,23 @@ mod test {
|
15 | 51 |
"brainpoolP256r1", "brainpoolP384r1", "brainpoolP512r1",
|
16 | 52 |
"secp256k1",
|
17 | 53 |
] {
|
|
35 | 71 |
if let Some(k) =
|
36 | 72 |
key.with_policy(&p, None)?.keys().subkeys().supported().next()
|
37 | 73 |
{
|
38 | |
@@ -3241,7 +3256,7 @@ mod test {
|
|
74 |
@@ -3241,7 +3258,7 @@ mod test {
|
39 | 75 |
_ => (),
|
40 | 76 |
}
|
41 | 77 |
} else {
|
|
44 | 80 |
alg);
|
45 | 81 |
continue;
|
46 | 82 |
}
|
|
83 |
@@ -3249,8 +3266,8 @@ mod test {
|
|
84 |
let h = VHelper::for_decryption(0, 0, 0, 0, Vec::new(),
|
|
85 |
vec![key], Vec::new());
|
|
86 |
let mut d = DecryptorBuilder::from_bytes(
|
|
87 |
- crate::tests::message(&format!("encrypted/{}.msg.pgp", alg)))?
|
|
88 |
- .with_policy(&p, None, h)?;
|
|
89 |
+ crate::tests::message(&format!("encrypted/{}.msg.pgp", alg))).unwrap()
|
|
90 |
+ .with_policy(&p, None, h).unwrap();
|
|
91 |
assert!(d.message_processed());
|
|
92 |
|
|
93 |
if d.helper_ref().error > 0 {
|