Commit 8644bf7c authored by Matt Hyman's avatar Matt Hyman Committed by Hirsch Singhal
Browse files

Ensure that TLS 1.1 and 1.2 are enabled for .NET. (#272)

Thanks! 
parent f2513bf4
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -59,7 +59,17 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// Device connection object.
        /// </summary>
        private IDevicePortalConnection deviceConnection;
#if !WINDOWS_UWP

        /// <summary>
        /// Initializes static members of the <see cref="DevicePortal" /> class.
        /// </summary>
        static DevicePortal()
        {
            System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
        }

#endif
        /// <summary>
        /// Initializes a new instance of the <see cref="DevicePortal" /> class.
        /// </summary>
@@ -175,7 +185,6 @@ namespace Microsoft.Tools.WindowsDevicePortal
            }
        }


        /// <summary>
        /// Connects to the device pointed to by IDevicePortalConnection provided in the constructor.
        /// </summary>