-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper status code from function. Added null certificate consumer.
- Loading branch information
Showing
8 changed files
with
96 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/LetsEncrypt.Azure.Core.V2/CertificateConsumers/ICertificateConsumer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using LetsEncrypt.Azure.Core.V2.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LetsEncrypt.Azure.Core.V2.CertificateConsumers | ||
{ | ||
public interface ICertificateConsumer | ||
{ | ||
/// <summary> | ||
/// Installs/assigns the new certificate. | ||
/// </summary> | ||
/// <param name="model"></param> | ||
/// <returns></returns> | ||
Task Install(ICertificateInstallModel model); | ||
|
||
/// <summary> | ||
/// Remove any expired certificates | ||
/// </summary> | ||
/// <returns>List of thumbprint for certificates removed</returns> | ||
Task<List<string>> CleanUp(); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LetsEncrypt.Azure.Core.V2/CertificateConsumers/NullCertificateConsumer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using LetsEncrypt.Azure.Core.V2.Models; | ||
|
||
namespace LetsEncrypt.Azure.Core.V2.CertificateConsumers | ||
{ | ||
/// <summary> | ||
/// Certificate consumer that does do anything. | ||
/// </summary> | ||
public class NullCertificateConsumer : ICertificateConsumer | ||
{ | ||
public Task<List<string>> CleanUp() | ||
{ | ||
return Task.FromResult(new List<string>()); | ||
} | ||
|
||
public Task Install(ICertificateInstallModel model) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters