From 3f89b14700daa30f456902f22f6c22ecdd35a48a Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 27 Feb 2020 18:36:44 -0500 Subject: Advertise STS policy Duration is set to INT_MAX since pounce will never accept cleartext connections. --- client.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 66d07d0..25707a8 100644 --- a/client.c +++ b/client.c @@ -31,6 +31,7 @@ #include "bounce.h" bool clientCA; +bool clientSTS = true; char *clientPass; char *clientAway; @@ -168,8 +169,13 @@ static void handleCap(struct Client *client, struct Message *msg) { if (!msg->params[0]) msg->params[0] = ""; enum Cap avail = (stateCaps & ~CapSASL) - | CapServerTime | CapConsumer | CapPassive | (clientCA ? CapSASL : 0); - const char *values[CapBits] = { [CapSASLBit] = "EXTERNAL" }; + | CapServerTime | CapConsumer | CapPassive + | (clientCA ? CapSASL : 0) + | (clientSTS ? CapSTS : 0); + const char *values[CapBits] = { + [CapSASLBit] = "EXTERNAL", + [CapSTSBit] = "duration=2147483647", + }; if (!strcmp(msg->params[0], "END")) { if (!client->need) return; -- cgit 1.4.1