diff options
author | June McEnroe <june@causal.agency> | 2020-02-27 18:36:44 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-27 18:36:44 -0500 |
commit | 3f89b14700daa30f456902f22f6c22ecdd35a48a (patch) | |
tree | 705759c24e1535dfcc37f3289362a40b030f89ff /client.c | |
parent | Document the causal.agency/consumer vendor capability (diff) | |
download | pounce-3f89b14700daa30f456902f22f6c22ecdd35a48a.tar.gz pounce-3f89b14700daa30f456902f22f6c22ecdd35a48a.zip |
Advertise STS policy
Duration is set to INT_MAX since pounce will never accept cleartext connections.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 10 |
1 files changed, 8 insertions, 2 deletions
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; |