Skip to content
Merged
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
9 changes: 5 additions & 4 deletions nameshield-caplugin/NameshieldCAPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionar
{
throw new Exception($"Certificate request for subect {subject} was rejected");
}
int time = 0;
while (string.Equals(status, "checked_out", StringComparison.OrdinalIgnoreCase) && time < 8)
int time = 1;
while (string.Equals(status, "checked_out", StringComparison.OrdinalIgnoreCase) && time <= 10)
{
_logger.LogTrace($"Cert retured CHECKED_OUT status, rechecking in 5 seconds. Pickup attempt {time} of 8");
// Sleep for 5 seconds then try again, up to a max of 8 tries
_logger.LogTrace($"Cert retured CHECKED_OUT status, rechecking in 5 seconds. Pickup attempt {time} of 10");
// Sleep for 5 seconds then try again, up to a max of 10 tries
Thread.Sleep(5000);
time++;
response = Task.Run(async () => await client.GetOrderDetails(response.Order.Id)).Result;
Expand All @@ -133,6 +133,7 @@ public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionar
StatusMessage = "Certificate is pending issuance and will be picked up by a future sync."
};
}
_logger.LogTrace($"Certificate enrolled successfully");

var cert = GetSingleRecord(response.Order.Relationships.Certificate.Data.id).Result;

Expand Down
Loading