private static async Task <AuthorizationChallengeResponse> CompleteChallenge(Kenc.ACMELib.ACMEClient acmeClient, AuthorizationChallenge challenge, string value) { try { return(await acmeClient.CompleteChallengeAsync(challenge.Url, challenge.Token, value)); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(null); }
private static async Task <Order> NewOrderAsync(Kenc.ACMELib.ACMEClient acmeClient, IEnumerable <OrderIdentifier> domains) { try { var result = await acmeClient.OrderAsync(domains); return(result); } catch (ACMEException ex) { Console.WriteLine(ex.Descriptor); Console.WriteLine(ex.Message); } catch (Exception ex) { Console.WriteLine(ex.GetType()); Console.WriteLine(ex.Message); } return(null); }
private static async Task <IEnumerable <AuthorizationChallengeResponse> > RetrieveAuthz(Kenc.ACMELib.ACMEClient acmeClient, Uri[] uris) { var challenges = new List <AuthorizationChallengeResponse>(); foreach (var uri in uris) { try { var result = await acmeClient.GetAuthorizationChallengeAsync(uri); challenges.Add(result); } catch (Exception ex) { Console.WriteLine(ex.Message); } } return(challenges); }