From ec996134a1f23ee36aff9d3ad2c800af71623207 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 3 Nov 2017 14:33:51 +0100 Subject: fix: no expiration date means not outdated We were using Time.at(expirationdate) even if it was nil which led to using the Time.at(0). Instead an unset expirationdate is meant to not expire the key at all. Our tests did not catch this because the assertions were in blocks that did not get run at all. (at least in the HKP integration test). --- lib/nickserver/hkp/key_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/nickserver/hkp/key_info.rb b/lib/nickserver/hkp/key_info.rb index e1a9500..c1b1ad3 100644 --- a/lib/nickserver/hkp/key_info.rb +++ b/lib/nickserver/hkp/key_info.rb @@ -49,7 +49,7 @@ module Nickserver::Hkp def expirationdate expires = properties[4] - Time.at(expires.to_i) + expires && Time.at(expires.to_i) end def flags -- cgit v1.2.3