Fix TLS 1.2 for CAS backchannel ticket validation#13
Conversation
Co-authored-by: srkirkland <202753+srkirkland@users.noreply.github.com>
Co-authored-by: srkirkland <202753+srkirkland@users.noreply.github.com>
|
@copilot 1. should i put the ServicePointManager.SecurityProtocol somewhere higher, like in a global startup, or keep it here in the casmvc manager? |
|
WebClient.OpenRead()in CasMvc.cs uses .NET Framework 4.5's default TLS 1.0, which the CAS server no longer accepts, causing SSL handshake failures during ticket validation.Changes
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12before the backchannel callWebClientandStreamReaderinusingstatementsSetting
SecurityProtocolglobally is intentional—all HTTPS connections in the app should use TLS 1.2+.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.