[Pkg-gnupg-commit] [gnupg2] 09/21: wks: Add hack for the broken posteo system
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Sep 19 15:33:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit a821b4f5567d02c3329c2b94a73dcbe12e6699a2
Author: Werner Koch <wk at gnupg.org>
Date: Tue Sep 12 18:08:09 2017 +0200
wks: Add hack for the broken posteo system
* tools/gpg-wks-client.c (command_send): Additional hack for posteo.
Check the protocol-version flag.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
tools/gpg-wks-client.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c
index 5b98de4..e703640 100644
--- a/tools/gpg-wks-client.c
+++ b/tools/gpg-wks-client.c
@@ -693,6 +693,7 @@ command_send (const char *fingerprint, char *userid)
mime_maker_t mime = NULL;
struct policy_flags_s policy;
int no_encrypt = 0;
+ int posteo_hack = 0;
const char *domain;
memset (&policy, 0, sizeof policy);
@@ -762,11 +763,14 @@ command_send (const char *fingerprint, char *userid)
if (policy.auth_submit)
log_info ("no confirmation required for '%s'\n", addrspec);
- /* Hack to support old providers. */
- if (policy.auth_submit && !ascii_strcasecmp (domain, "posteo.de"))
+ /* Hack to support posteo but let them disable this by setting the
+ * new policy-version flag. */
+ if (policy.protocol_version < 3
+ && !ascii_strcasecmp (domain, "posteo.de"))
{
log_info ("Warning: Using draft-1 method for domain '%s'\n", domain);
no_encrypt = 1;
+ posteo_hack = 1;
}
/* Encrypt the key part. */
@@ -805,6 +809,18 @@ command_send (const char *fingerprint, char *userid)
void *data;
size_t datalen, n;
+ if (posteo_hack)
+ {
+ /* Needs a multipart/mixed with one(!) attachment. It does
+ * not grok a non-multipart mail. */
+ err = mime_maker_add_header (mime, "Content-Type", "multipart/mixed");
+ if (err)
+ goto leave;
+ err = mime_maker_add_container (mime);
+ if (err)
+ goto leave;
+ }
+
err = mime_maker_add_header (mime, "Content-type",
"application/pgp-keys");
if (err)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list