Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit c5b3c34

Browse files
committed
Merge branch 'pdateTravisCI' of https://github.com/splunk/splunk-sdk-csharp-pcl into pdateTravisCI
2 parents 885522c + 49aaa2c commit c5b3c34

File tree

14 files changed

+620
-10
lines changed

14 files changed

+620
-10
lines changed

examples/authenticate/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static Program()
3434
// 1. Instantiate a WebRequestHandler
3535
// 2. Set its ServerCertificateValidationCallback
3636
// 3. Instantiate a Splunk.Client.Context with the WebRequestHandler
37-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
37+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3838
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>
3939
{
4040
return true;

examples/list_apps/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static Program()
3434
// 1. Instantiate a WebRequestHandler
3535
// 2. Set its ServerCertificateValidationCallback
3636
// 3. Instantiate a Splunk.Client.Context with the WebRequestHandler
37-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
37+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3838
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>
3939
{
4040
return true;

examples/mock-context/TestApplication.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ApplicationTest
1515
[Fact]
1616
public async Task TestApplications()
1717
{
18-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
18+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
1919
using (var service = await SdkHelper.CreateService())
2020
{
2121
ApplicationCollection apps = service.Applications;

examples/normal-search/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Program
3030
{
3131
static void Main(string[] args)
3232
{
33-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
33+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3434
using (var service = new Service(SdkHelper.Splunk.Scheme, SdkHelper.Splunk.Host, SdkHelper.Splunk.Port, new Namespace(user: "nobody", app: "search")))
3535
{
3636
Run(service).Wait();

examples/saved-searches/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Program
2727
{
2828
static void Main(string[] args)
2929
{
30-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
30+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3131
using (var service = new Service(SdkHelper.Splunk.Scheme, SdkHelper.Splunk.Host, SdkHelper.Splunk.Port, new Namespace(user: "nobody", app: "search")))
3232
{
3333
Run(service).Wait();

examples/search-export/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static async Task Run(Service service)
4242

4343
//// Search : Export Previews
4444

45-
using (SearchPreviewStream stream = await service.ExportSearchPreviewsAsync("search index=_internal | head 100"))
45+
using (SearchPreviewStream stream = await service.ExportSearchPreviewsAsync("search index=_internal"))
4646
{
4747
int previewNumber = 0;
4848

examples/search-realtime/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Program
3030
{
3131
static void Main(string[] args)
3232
{
33-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
33+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3434
using (var service = new Service(SdkHelper.Splunk.Scheme, SdkHelper.Splunk.Host, SdkHelper.Splunk.Port, new Namespace(user: "nobody", app: "search")))
3535
{
3636
Task task = Run(service);

examples/search-response-message-stream/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static Program()
3333
// 1. Instantiate a WebRequestHandler
3434
// 2. Set its ServerCertificateValidationCallback
3535
// 3. Instantiate a Splunk.Client.Context with the WebRequestHandler
36-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
36+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3737
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>
3838
{
3939
return true;

examples/search/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Program
2828
{
2929
static void Main(string[] args)
3030
{
31-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
31+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3232
using (var service = new Service(SdkHelper.Splunk.Scheme, SdkHelper.Splunk.Host, SdkHelper.Splunk.Port, new Namespace(user: "nobody", app: "search")))
3333
{
3434
Run(service).Wait();

examples/submit/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static Program()
3434
//// 1. Instantiate a WebRequestHandler
3535
//// 2. Set its ServerCertificateValidationCallback
3636
//// 3. Instantiate a Splunk.Client.Context with the WebRequestHandler
37-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
37+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
3838
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>
3939
{
4040
return true;

src/Splunk.Client/Splunk/Client/AtomEntry.cs

+7
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ static async Task<dynamic> ParseDictionaryAsync(XmlReader reader, int level)
334334

335335
// TODO: Include a domain-specific name translation capability (?)
336336

337+
// The reason why some fields are extruded or transmogrified is that
338+
// these fields are both a value and a dictionary. For example
339+
// action.logevent = <0|1> (e.g enabled or disabled), but it also
340+
// contains a dictionary of fields such as
341+
// action.logevent.command = <something>
337342
if (level == 0)
338343
{
339344
switch (name)
@@ -352,6 +357,8 @@ static async Task<dynamic> ParseDictionaryAsync(XmlReader reader, int level)
352357
case "action.webhook":
353358
case "alert.suppress":
354359
case "auto_summarize":
360+
case "action.logevent":
361+
case "action.lookup":
355362
name += ".IsEnabled";
356363
break;
357364
case "alert_comparator":

0 commit comments

Comments
 (0)