Skip to content

Commit 19a9f45

Browse files
ACME - allow init even with invalid account uri
1 parent c5e440b commit 19a9f45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Certify.Providers/ACME/Anvil/AnvilACMEProvider.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,11 @@ public async Task<bool> InitProvider(ILog log = null, AccountDetails account = n
225225

226226
if (!string.IsNullOrEmpty(_settings.AccountUri))
227227
{
228-
_acme.SetAccountUri(new Uri(_settings.AccountUri));
228+
// account uri may be invalid even on an otherwise valid account
229+
if (Uri.TryCreate(_settings.AccountUri, UriKind.Absolute, out var accountUri))
230+
{
231+
_acme.SetAccountUri(accountUri);
232+
}
229233
}
230234

231235
if (_currentOrders == null)

0 commit comments

Comments
 (0)