diff options
author | Wouter Tinus <win.acme.simple@gmail.com> | 2019-11-09 08:34:28 +0100 |
---|---|---|
committer | Wouter Tinus <win.acme.simple@gmail.com> | 2019-11-09 08:34:28 +0100 |
commit | 14bf0d8596df0cf02f1cdee499b5097c669efcb6 (patch) | |
tree | 4f4c8a6e0ee88ba2f8c674d1658c2c09bf0112c2 /src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs | |
parent | edf967d7bfa0697e86fde77b5809b665961a5fc3 (diff) | |
download | letsencrypt-win-simple-14bf0d8596df0cf02f1cdee499b5097c669efcb6.zip letsencrypt-win-simple-14bf0d8596df0cf02f1cdee499b5097c669efcb6.tar.gz letsencrypt-win-simple-14bf0d8596df0cf02f1cdee499b5097c669efcb6.tar.bz2 |
fix #1262 and #1255
Diffstat (limited to 'src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs')
-rw-r--r-- | src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs b/src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs index c430ce2..3acca6c 100644 --- a/src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs +++ b/src/main.lib/Plugins/ValidationPlugins/Http/HttpValidation.cs @@ -6,7 +6,7 @@ using System; using System.Diagnostics; using System.IO; using System.Linq; -using System.Net; +using System.Net.Http; using System.Threading.Tasks; namespace PKISharp.WACS.Plugins.ValidationPlugins @@ -106,13 +106,19 @@ namespace PKISharp.WACS.Plugins.ValidationPlugins var value = await WarmupSite(); if (Equals(value, _challenge.HttpResourceValue)) { - _log.Information("Preliminary validation looks good, but ACME will be more thorough..."); + _log.Information("Preliminary validation looks good, but the ACME server will be more thorough"); } else { - _log.Warning("Preliminary validation failed, found {value} instead of {expected}", foundValue ?? "(null)", _challenge.HttpResourceValue); + _log.Warning("Preliminary validation failed, the server answered '{value}' instead of '{expected}'. The ACME server might have a different perspective", + foundValue ?? "(null)", + _challenge.HttpResourceValue); } } + catch (HttpRequestException hrex) + { + _log.Warning("Preliminary validation failed because {hrex}. The ACME server might have a different perspective", hrex.Message); + } catch (Exception ex) { _log.Error(ex, "Preliminary validation failed"); @@ -127,7 +133,7 @@ namespace PKISharp.WACS.Plugins.ValidationPlugins /// <param name="uri"></param> private async Task<string> WarmupSite() { - using var client = _proxy.GetHttpClient(); + using var client = _proxy.GetHttpClient(false); var response = await client.GetAsync(_challenge.HttpResourceUrl); return await response.Content.ReadAsStringAsync(); } |