+147
−144
Loading
The SEC_CHANNEL_BINDINGS buffer was only ever built on continuation calls. That is sufficient for raw NTLM, whose channel binding travels in message 3, but SPNEGO carries the AP-REQ in the very first token, so Kerberos needs the bindings from the initial call on and never received them. Move the token construction into a helper and attach it whenever a certificate is available, building the input buffer descriptor up front so it can be passed with no accompanying token. Keep the certificate for the lifetime of the sequence instead of freeing it after first use, so every leg of a multi-leg exchange carries the bindings. The exemption for PACKAGE_TYPE_NTLM covers the sys-ntlm module only, which keeps behaving exactly as it does today. NTLM negotiated inside SPNEGO runs under PACKAGE_TYPE_NEGOTIATE and will now carry bindings from the first call: that is the main behaviour change here and the one worth reviewing closely, since raw NTLM is deliberately untouched. On its own this commit changes nothing, because no caller supplies a certificate on the Negotiate path until the next one. Original Revision: https://phabricator.services.mozilla.com/D316807 Differential Revision: https://phabricator.services.mozilla.com/D317836