aspnet / LibraryManager

Other
446 stars 78 forks source link

Add setting to force TLS 1.2 #751

Closed jimmylewis closed 1 month ago

jimmylewis commented 1 month ago

Per #711 (and #699 before it), some users need to force TLS 1.2 for libman to work.

This change adds a new user setting, "forcetls12", which will set libman to use TLS1.2 for any HttpClient it creates.

I verified via WireShark that the traffic to services (cdnjs, etc) that libman calls to switched from 1.3 (my system default) to 1.2 when this setting was in place, and returned to 1.3 by unsetting it. I could also see that other connections from within VS were still using TLS1.3 so we didn't affect other components on accident.

Resolves #711