Commit c2474d9f c2474d9f66a2ceb53303fff9581061c62744deea by Christian Gerdes

Uppdaterat ServiceManagerPlugin så det är samma funktionalitet avseende TLS1.2 s…

…om ServiceManagerWebTestPlugin
1 parent 82588790
...@@ -44,7 +44,7 @@ namespace LIL_VSTT_Plugins ...@@ -44,7 +44,7 @@ namespace LIL_VSTT_Plugins
44 /// Service Manager Plugin 44 /// Service Manager Plugin
45 /// </summary> 45 /// </summary>
46 [DisplayName("Service Manager Config")] 46 [DisplayName("Service Manager Config")]
47 [Description("(C) Copyright 2015 LIGHTS IN LINE AB\r\nSätter config värden i Service Manager instansen för hela testet.")] 47 [Description("(C) Copyright 2015 LIGHTS IN LINE AB\r\nSätter config värden i Service Manager instansen för hela loadtestet. Finns även som WebTestPlugin som enbart slår på det webtestet.")]
48 public class ServiceManagerPlugin : ILoadTestPlugin 48 public class ServiceManagerPlugin : ILoadTestPlugin
49 { 49 {
50 [DisplayName("Use Expect 100 Behaviour"), DefaultValue(true)] 50 [DisplayName("Use Expect 100 Behaviour"), DefaultValue(true)]
...@@ -65,13 +65,17 @@ namespace LIL_VSTT_Plugins ...@@ -65,13 +65,17 @@ namespace LIL_VSTT_Plugins
65 [DisplayName("Use Nagle Algorithm"), DefaultValue(false)] 65 [DisplayName("Use Nagle Algorithm"), DefaultValue(false)]
66 public bool useNagle { get; set; } 66 public bool useNagle { get; set; }
67 67
68 [DisplayName("Force TLS 1.2"), DefaultValue(false)]
69 [Description("Kräver .NET 4.5 samt att TLS1.2 är aktiverat i SChannel (använd bifogad schannel_high.reg)")]
70 public bool useTls12 { get; set; }
71
68 public void Initialize(LoadTest loadTest) 72 public void Initialize(LoadTest loadTest)
69 { 73 {
70 System.Net.ServicePointManager.Expect100Continue = exp100; 74 System.Net.ServicePointManager.Expect100Continue = exp100;
71 System.Net.ServicePointManager.MaxServicePointIdleTime = maxIdle; 75 System.Net.ServicePointManager.MaxServicePointIdleTime = maxIdle;
72 System.Net.ServicePointManager.SetTcpKeepAlive(keepAlive, timeOut, interVal); 76 System.Net.ServicePointManager.SetTcpKeepAlive(keepAlive, timeOut, interVal);
73 System.Net.ServicePointManager.UseNagleAlgorithm = useNagle; 77 System.Net.ServicePointManager.UseNagleAlgorithm = useNagle;
74 //System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls; Needs .net 4.5 in order to enable high security protocols 78 if (useTls12) System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
75 } 79 }
76 80
77 } 81 }
......