From 81aebf897b55c399e63f01d6531cfc38dc20242f Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 21 Aug 2013 16:03:15 -0400 Subject: [PATCH] zephyr_mirror: Finish outgoing zcrypt. (imported from commit dfef23feb8e0f6a0a8ba775b6cccd391cb307adb) --- bots/zephyr_mirror_backend.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 9fc5291..bd04bf9 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -557,7 +557,7 @@ def send_unauthed_zephyr(zwrite_args, content): def zcrypt_encrypt_content(zephyr_class, instance, content): keypath = parse_crypt_table(zephyr_class, instance) if keypath is None: - return content + return None # encrypt the message! p = subprocess.Popen(["gpg", @@ -627,7 +627,10 @@ def forward_to_zephyr(message): zwrite_args.extend(recipients) if message['type'] == "stream": - wrapped_content = zcrypt_encrypt_content(zephyr_class, instance, wrapped_content) + result = zcrypt_encrypt_content(zephyr_class, instance, wrapped_content) + if result is not None: + wrapped_content = result + zwrite_args.extend(["-O", "crypt"]) if options.test_mode: logger.debug("Would have forwarded: %s\n%s" %