Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ACMESharp/Protocol/AcmeProtocolClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ public async Task<AccountDetails> DeactivateAccountAsync(
/// https://tools.ietf.org/html/draft-ietf-acme-acme-12#section-7.1.3
/// </remarks>
public async Task<OrderDetails> CreateOrderAsync(IEnumerable<Identifier> identifiers,
string replacesCertificateId = null,
DateTime? notBefore = null,
DateTime? notAfter = null,
CancellationToken cancel = default(CancellationToken))
Expand All @@ -389,6 +390,7 @@ public async Task<OrderDetails> CreateOrderAsync(IEnumerable<Identifier> identif
Identifiers = identifiers.ToArray(),
NotBefore = notBefore?.ToString(Constants.Rfc3339DateTimeFormat),
NotAfter = notAfter?.ToString(Constants.Rfc3339DateTimeFormat),
Replaces = replacesCertificateId
};
var resp = await SendAcmeAsync(
new Uri(_http.BaseAddress, Directory.NewOrder),
Expand All @@ -412,11 +414,12 @@ public async Task<OrderDetails> CreateOrderAsync(IEnumerable<Identifier> identif
/// https://tools.ietf.org/html/draft-ietf-acme-acme-12#section-7.1.3
/// </remarks>
public Task<OrderDetails> CreateOrderAsync(IEnumerable<string> dnsIdentifiers,
string replacesCertificateId = null,
DateTime? notBefore = null,
DateTime? notAfter = null,
CancellationToken cancel = default(CancellationToken)) => CreateOrderAsync(
dnsIdentifiers.Select(dns => new Identifier() { Type = "dns", Value = dns }).ToArray(),
notBefore, notAfter, cancel);
replacesCertificateId, notBefore, notAfter, cancel);

/// <summary>
/// Retrieves the current status and details of an existing Order.
Expand Down
3 changes: 3 additions & 0 deletions src/ACMESharp/Protocol/Messages/CreateOrderRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ public class CreateOrderRequest

[JsonProperty("notAfter", NullValueHandling = NullValueHandling.Ignore)]
public string NotAfter { get; set; }

[JsonProperty("replaces", NullValueHandling = NullValueHandling.Ignore)]
public string Replaces { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/ACMESharp/Protocol/Resources/ServiceDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public class ServiceDirectory
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string KeyChange { get; set; } //! = "acme/key-change";

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string RenewalInfo { get; set; } //! = "acme/renewal-info";

public DirectoryMeta Meta { get; set; }

public IEnumerable<string> GetExtraNames() => _extra?.Keys;
Expand Down