/// <summary> /// Initializes the <see cref="SdkHelper" /> class. /// </summary> static SdkHelper() { ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; }; var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); splunk = new SplunkRC(Path.Combine(home, ".splunkrc")); }
/// <summary> /// Initializes the <see cref="SdkHelper" /> class. /// </summary> static SdkHelper() { ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return(true); }; var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); splunk = new SplunkRC(Path.Combine(home, ".splunkrc")); }
/// <summary> /// Initializes the <see cref="SdkHelper" /> class. /// </summary> static SdkHelper() { //// TODO: Use WebRequestHandler.ServerCertificateValidationCallback instead //// 1. Instantiate a WebRequestHandler //// 2. Set its ServerCertificateValidationCallback //// 3. Instantiate a Splunk.Client.Context with the WebRequestHandler ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return(true); }; var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); splunk = new SplunkRC(Path.Combine(home, ".splunkrc")); }