Skip to content

Commit 711e724

Browse files
committed
Merge branch 'master' into automatic-analyzer
2 parents ed5b915 + ed39141 commit 711e724

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+201
-171
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,13 @@ SSLLWrapper.IntegrationTests/obj/Release/
1515
SSLLWrapper.IntegrationTests/obj/Debug/
1616
SSLLWrapper.IntegrationTests/bin/Release/
1717
SSLLWrapper.IntegrationTests/bin/Debug/
18+
SSLLabsApiWrapper/obj/Debug/
19+
SSLLabsApiWrapper.Tests/bin/Debug/
20+
SSLLabsApiWrapper/bin/
21+
SSLLabsApiWrapper.Tests/obj/
22+
SSLLabsApiWrapper/obj/
23+
SSLLabsApiWrapper.IntegrationTests/bin/
24+
SSLLabsApiWrapper.IntegrationTests/obj/Debug/SSLLWrapper.IntegrationTests.csproj.FileListAbsolute.txt
25+
SSLLabsApiWrapper.IntegrationTests/obj/
26+
SSLLabsApiWrapper.Tests/bin/
27+
*.nupkg

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
SSLLWrapper
1+
What Is this wrapper?
22
===========
33

4-
SSLLWrapper stands for SSL Labs Wrapper which is the first publicly available .NET wrapper developed for the [SSL Labs' Assessment API's](https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md) that allow the consumer to test SSL servers on the public internet.
4+
This is the first publicly available .NET wrapper developed for the [SSL Labs' Assessment API's](https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md) that allow the consumer to test SSL servers on the public internet.
55

66
This wrapper easies the communication to the API's for .NET developers which allows you as the developer to focus on your project rather than managing the plumbing and overhead required to consume the API's.
77

@@ -10,25 +10,25 @@ This wrapper easies the communication to the API's for .NET developers which all
1010
- The wrapper does **NOT** use web scrapping like other wrappers which don't use the assessment API's.
1111

1212
### NuGet Package
13-
The wrapper can easily be imported into your project using the [SSLLWrapper NuGet package](https://www.nuget.org/packages/SSLLWrapper/). The NuGet install command for this package is:
13+
The wrapper can easily be imported into your project using the [NuGet package](https://www.nuget.org/packages/SSLLabsApiWrapper/). The NuGet install command for this package is:
1414

15-
**PM> Install-Package SSLLWrapper**
15+
**PM> Install-Package SSLLabsApiWrapper**
1616

1717
### Wrapper Usage
18-
When creating a new instance of SSLLWrapper you must supply the API url during the initialization. For example in C# this would be expressed as the following:
18+
When creating a new instance of SSL Labs api wrapper service you must supply the API url during the initialization. For example in C# this would be expressed as the following:
1919
```C#
20-
var ssllService = new SSLLWrapper.SSLLService("https://api.dev.ssllabs.com/api/fa78d5a4");
20+
var ssllService = new SSLLabsApiWrapper.SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4");
2121

22-
// Or if you use the SSLWrapper namespace this can be shorten to
23-
var ssllService = new SSLLService("https://api.dev.ssllabs.com/api/fa78d5a4");
22+
// Or if you use the SSLLabsApiWrapper namespace this can be shorten to
23+
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4");
2424
```
2525
#### Methods
2626

27-
Below are the method signatures of the SSLLWrapper Service.
27+
Below are the method signatures of the SSL Labs api wrapper service.
2828

2929
##### Info()
3030

31-
The Info method is used to determine if the API is online and returns an [Info response object](https://github.com/AshleyPoole/SSLLWrapper/blob/master/README.md#info-1). No input parameters are taken.
31+
The Info method is used to determine if the API is online and returns an [Info response object](https://github.com/AshleyPoole/sslLabs-api-wrapper/blob/master/README.md#info-1). No input parameters are taken.
3232

3333
```C#
3434
public Info Info()
@@ -47,6 +47,20 @@ The wrapper also contains an overloaded Analyze method which only requires the h
4747
public Analyze Analyze(string host)
4848
```
4949

50+
##### AutomaticAnalyze()
51+
52+
The Analyze method is used to initiate and wait for an assessment to complete before retrieving results. Compared to the normal Analyze() method this method keeps checking the Api and only when a scan has finished does it return. This saves the comsumer from having to write their own logic for handling an assessment in progress.
53+
Another call to GetEndpointDetails() may be needed to view the whole result set for a given endpoint.
54+
55+
```C#
56+
public Analyze AutomaticAnalyze(string host, Publish publish, ClearCache clearCache, FromCache fromCache, All all)
57+
```
58+
59+
The wrapper also contains an overloaded AutomaticAnalyze method which only requires the host parameter. Internal is uses the following parameter options - Publish.Off, ClearCache.On, FromCache.Ignore, All.On.
60+
```C#
61+
public Analyze AutomaticAnalyze(string host)
62+
```
63+
5064
##### GetEndpointData()
5165

5266
The GetEndpointData method is used to retrieve a fully results set.
@@ -98,7 +112,8 @@ public class Error
98112
public string engineVersion { get; set; }
99113
public string criteriaVersion { get; set; }
100114
public int clientMaxAssessments { get; set; }
101-
public string notice { get; set; }
115+
public int currentAssessments { get; set; }
116+
public List<string> messages { get; set; }
102117
public bool Online { get; set; }
103118
```
104119

@@ -170,8 +185,8 @@ public enum All
170185
### Author
171186
Ashley Poole - www.ashleypoole.co.uk.
172187

173-
[SSLWrapper project's home page](http://www.ashleypoole.co.uk/ssllwrapper?utm_source=github&utm_medium=githubproject&utm_campaign=ssllwrapper)
188+
[Project's home page](http://www.ashleypoole.co.uk/ssllabs-api-wrapper?utm_source=github&utm_medium=githubproject&utm_campaign=ssllwrapper)
174189

175-
Please contact me if you have any questions, issues or recommendations either via [my website](http://www.ashleypoole.co.uk), [Twitter](http://twitter.com/geekypants92) or [by email](mailto:[email protected]).
190+
Please contact me if you have any questions, issues or recommendations either via [my website](http://www.ashleypoole.co.uk), [Twitter](http://twitter.com/AshleyPooleUK) or [by email](mailto:[email protected]).
176191

177192

SSLLWrapper/Models/Response/EndpointSubModels/Key.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

SSLLWrapper/Models/Response/EndpointSubModels/List.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

SSLLWrapper.IntegrationTests/AnalyzeTests.cs renamed to SSLLabsApiWrapper.IntegrationTests/AnalyzeTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
using System.Configuration;
22
using FluentAssertions;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
4-
using SSLLWrapper;
5-
using SSLLWrapper.Models.Response;
4+
using SSLLabsApiWrapper;
5+
using SSLLabsApiWrapper.Models.Response;
66

77
namespace given_that_I_make_a_analyze_request
88
{
99
[TestClass]
1010
public class when_i_expect_a_successful_result
1111
{
12-
private static SSLLService _ssllService;
12+
private static SSLLabsApiService _ssllService;
1313
private static Analyze _analyze;
1414
private static string _host;
1515

1616
[ClassInitialize]
1717
public static void Setup(TestContext testContext)
1818
{
1919
_host = ConfigurationManager.AppSettings.Get("EndpointHost");
20-
_ssllService = new SSLLService(ConfigurationManager.AppSettings.Get("ApiUrl"));
20+
_ssllService = new SSLLabsApiService(ConfigurationManager.AppSettings.Get("ApiUrl"));
2121
_analyze = _ssllService.Analyze(_host);
2222
}
2323

File renamed without changes.

SSLLWrapper.IntegrationTests/AutomaticAnalyzeTests.cs renamed to SSLLabsApiWrapper.IntegrationTests/AutomaticAnalyzeTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
using System.Configuration;
22
using FluentAssertions;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
4-
using SSLLWrapper;
5-
using SSLLWrapper.Models.Response;
4+
using SSLLabsApiWrapper;
5+
using SSLLabsApiWrapper.Models.Response;
66

77
namespace given_that_I_make_a_automaticanalyze_request
88
{
99
[TestClass]
1010
public class when_i_expect_a_successful_result
1111
{
12-
private static SSLLService _ssllService;
12+
private static SSLLabsApiService _ssllService;
1313
private static Analyze _analyze;
1414
private static string _host;
1515

1616
[ClassInitialize]
1717
public static void Setup(TestContext testContext)
1818
{
1919
_host = ConfigurationManager.AppSettings.Get("EndpointHost");
20-
_ssllService = new SSLLService(ConfigurationManager.AppSettings.Get("ApiUrl"));
20+
_ssllService = new SSLLabsApiService(ConfigurationManager.AppSettings.Get("ApiUrl"));
2121
_analyze = _ssllService.AutomaticAnalyze(_host);
2222
}
2323

SSLLWrapper.IntegrationTests/GetEndpointDetails.cs renamed to SSLLabsApiWrapper.IntegrationTests/GetEndpointDetails.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Configuration;
22
using FluentAssertions;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
4-
using SSLLWrapper;
5-
using SSLLWrapper.Models.Response;
4+
using SSLLabsApiWrapper;
5+
using SSLLabsApiWrapper.Models.Response;
66

77
namespace given_that_I_make_a_GetEndpointDetails_request
88
{
@@ -22,7 +22,7 @@ public static void Setup(TestContext testContext)
2222
_endpointHost = ConfigurationManager.AppSettings.Get("EndpointHost");
2323
_endpointIp = ConfigurationManager.AppSettings.Get("EndpointIP");
2424

25-
var ssllService = new SSLLService(ConfigurationManager.AppSettings.Get("ApiUrl"));
25+
var ssllService = new SSLLabsApiService(ConfigurationManager.AppSettings.Get("ApiUrl"));
2626
_endpoint = ssllService.GetEndpointData(_endpointHost, _endpointIp);
2727
}
2828

SSLLWrapper.IntegrationTests/GetStatusCodesTests.cs renamed to SSLLabsApiWrapper.IntegrationTests/GetStatusCodesTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Configuration;
22
using FluentAssertions;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
4-
using SSLLWrapper;
5-
using SSLLWrapper.Models.Response;
4+
using SSLLabsApiWrapper;
5+
using SSLLabsApiWrapper.Models.Response;
66

77
namespace given_that_I_make_a_GetStatusCodes_request
88
{
@@ -14,7 +14,7 @@ public class when_i_expect_a_successful_result
1414
[ClassInitialize]
1515
public static void Setup(TestContext testContext)
1616
{
17-
var ssllService = new SSLLService(ConfigurationManager.AppSettings.Get("ApiUrl"));
17+
var ssllService = new SSLLabsApiService(ConfigurationManager.AppSettings.Get("ApiUrl"));
1818
_statusCodes = ssllService.GetStatusCodes();
1919
}
2020

SSLLWrapper.IntegrationTests/InfoTests.cs renamed to SSLLabsApiWrapper.IntegrationTests/InfoTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Configuration;
22
using FluentAssertions;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
4-
using SSLLWrapper;
5-
using SSLLWrapper.Models.Response;
4+
using SSLLabsApiWrapper;
5+
using SSLLabsApiWrapper.Models.Response;
66

77
namespace given_that_I_make_a_info_request
88
{
@@ -14,7 +14,7 @@ public class when_i_expect_a_successful_result
1414
[ClassInitialize]
1515
public static void Setup(TestContext testContext)
1616
{
17-
var ssllService = new SSLLService(ConfigurationManager.AppSettings.Get("ApiUrl"));
17+
var ssllService = new SSLLabsApiService(ConfigurationManager.AppSettings.Get("ApiUrl"));
1818
_info = ssllService.Info();
1919
}
2020

0 commit comments

Comments
 (0)