Changeset

1926:4c4a4191b825

mod_watchuntrusted: Add a fallback string as hash if no certificate was provided
author Kim Alvefur <zash@zash.se>
date Fri, 23 Oct 2015 16:49:31 +0200
parents 1925:552faee596b7
children 1927:439711709d29
files mod_watchuntrusted/mod_watchuntrusted.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_watchuntrusted/mod_watchuntrusted.lua	Fri Oct 23 16:48:11 2015 +0200
+++ b/mod_watchuntrusted/mod_watchuntrusted.lua	Fri Oct 23 16:49:31 2015 +0200
@@ -44,8 +44,8 @@
 		end
 
 		local replacements = {
-			sha1 = event.cert and event.cert:digest("sha1"),
-			sha256 = event.cert and event.cert:digest("sha256"),
+			sha1 = event.cert and event.cert:digest("sha1") or "(No certificate)",
+			sha256 = event.cert and event.cert:digest("sha256") or "(No certificate)",
 			errors = error_message
 		};