summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/stream.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r--openpgp/src/serialize/stream.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs
index b0fccf93..e2ee0f34 100644
--- a/openpgp/src/serialize/stream.rs
+++ b/openpgp/src/serialize/stream.rs
@@ -2985,7 +2985,7 @@ mod test {
}
#[test]
- fn aead_messages() {
+ fn aead_messages() -> Result<()> {
// AEAD data is of the form:
//
// [ chunk1 ][ tag1 ] ... [ chunkN ][ tagN ][ tag ]
@@ -3009,7 +3009,7 @@ mod test {
use crate::parse::{
stream::{
- Decryptor,
+ DecryptorBuilder,
DecryptionHelper,
VerificationHelper,
MessageStructure,
@@ -3103,7 +3103,9 @@ mod test {
let h = Helper { policy: p, tsk: &tsk };
// Note: a corrupted message is only guaranteed
// to error out before it returns EOF.
- let mut v = match Decryptor::from_bytes(p, &msg, h, None) {
+ let mut v = match DecryptorBuilder::from_bytes(&msg)?
+ .with_policy(p, None, h)
+ {
Ok(v) => v,
Err(_) if do_err => continue,
Err(err) => panic!("Decrypting message: {}", err),
@@ -3143,6 +3145,7 @@ mod test {
}
}
}
+ Ok(())
}
#[test]