-
-
Notifications
You must be signed in to change notification settings - Fork 843
Description
Describe the bug
Error when creating a certificate from Entrust Certificate Serviceses using ACMEv2, this is done using manual request. The console errors with the information "Error requesting certificate [Manual] domain.example" directly after "Expecting challenge type http-01 not available". The log error that i get in the file states the following:
"System.Text.Json.JsonException: JSON deserialization for type 'ACMESharp.Protocol.Resources.AcmeOrder' was missing required properties, including the following: finalize"
When running the same command again i will get the certificate and it will install fine using the cache.
To Reproduce
- Set ACME BaseUri to https://acme.entrust.net/acme2/directory (requires ECS account and available certificates as well as key and token)
- Run with command line
wacs.exe
- Pick menu options
N, 2, input value, 3
- See error
Expected behavior
Get a certificate that is imported to the local machine store
Log
2024-05-02 16:53:27.129 +02:00 [VRB] [HTTP] Request completed with status "OK"
2024-05-02 16:53:27.130 +02:00 [VRB] [HTTP] Response content: {"status":"valid","expires":"2024-05-09T14:53:16Z","identififiers":[{"type":"dns","value":"domain.example"}],"authorizations":["https://acme.entrust.net/acme2/authz/********"],"certificate":"https://acme.entrust.net/acme2/cert/********"}
2024-05-02 16:53:27.160 +02:00 [ERR] Error requesting certificate [Manual] domain.example
System.Text.Json.JsonException: JSON deserialization for type 'ACMESharp.Protocol.Resources.AcmeOrder' was missing required properties, including the following: finalize
at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Converters.JsonMetadataServicesConverter
1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.Deserialize(Utf8JsonReader& reader, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable
1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo
1 jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonTypeInfo1 jsonTypeInfo) at ACMESharp.Protocol.AcmeProtocolClient.Deserialize[T](HttpResponseMessage resp, JsonTypeInfo
1 typeInfo)
at ACMESharp.Protocol.AcmeProtocolClient.SendAcmeAsync[TResponse,TRequest](String uri, JsonTypeInfo1 requestType, JsonTypeInfo
1 responseType, HttpMethod method, TRequest message, HttpStatusCode[] expectedStatuses, Boolean includePublicKey, String opName)
at ACMESharp.Protocol.AcmeProtocolClient.FinalizeOrderAsync(AcmeOrderDetails details, Byte[] derEncodedCsr)
at PKISharp.WACS.Clients.Acme.AcmeClientExtensions.<>c__DisplayClass1_01.<<Retry>b__0>d.MoveNext() --- End of stack trace from previous location --- at PKISharp.WACS.Clients.Acme.AcmeClientExtensions.Backoff[T](AcmeProtocolClient client, Func
1 executor, ILogService log, Int32 attempt)
at PKISharp.WACS.Clients.Acme.AcmeClientExtensions.Retry[T](AcmeProtocolClient client, Func`1 executor, ILogService log, Int32 attempt)
at PKISharp.WACS.Clients.Acme.AcmeClient.SubmitCsr(AcmeOrderDetails details, Byte[] csr)
at PKISharp.WACS.Services.CertificateService.RequestCertificate(ICsrPlugin csrPlugin, Order order)
at PKISharp.WACS.OrderProcessor.GetFromServer(OrderContext context)
Platform:
- OS: Windows 11
- Version: 2.2.8.1635 x64 pluggable
Additional context
Its just wierd that it works the second time with the cache and not directly. Could it perhaps be a timing problem? Entrust is not done with creating the certificate when we request it again?