summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko <heiko@schaefer.name>2021-05-11 16:16:10 +0200
committerHeiko <heiko@schaefer.name>2021-05-11 16:16:10 +0200
commit74d21c4c693091a9c02866f80d48b81510803bec (patch)
tree22476f1452cb20c2da274ce565b7b495002c378b
parent049e7e0fa068b660d4ce3d9a2e57618dc4584f93 (diff)
downloadopenpgp-ca-74d21c4c693091a9c02866f80d48b81510803bec.tar.gz
Added note about deadlock risk, and a general warning not to use this GnuPG wrapper for anything other than tests.
-rw-r--r--gnupg-test-wrapper/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnupg-test-wrapper/src/lib.rs b/gnupg-test-wrapper/src/lib.rs
index 261572f..e99f51a 100644
--- a/gnupg-test-wrapper/src/lib.rs
+++ b/gnupg-test-wrapper/src/lib.rs
@@ -19,6 +19,15 @@ use anyhow::{Context, Result};
use csv::StringRecord;
use rexpect::session::spawn_command;
+/// A simple wrapper for GnuPG, for use in OpenPGP CA integration tests.
+///
+/// NOTE: This wrapper is not defensively written.
+/// It is absolutely not intended for production PGP usage!
+///
+/// NOTE: gpg.wait() may deadlock if the child process stdout pipe is full.
+/// This doesn't seem to be a problem for the current set of tests, but is a
+/// limitation of this wrapper.
+
pub fn make_context() -> Result<Ctx> {
let ctx = Ctx::ephemeral().context(
"SKIP: Failed to create GnuPG context. Is GnuPG installed?",