Commit 4f7ba8f2 authored by Alexis Reigel's avatar Alexis Reigel

fix memoization

parent 36c05b31
......@@ -22,7 +22,6 @@ module Gitlab
using_keychain do |gpg_key|
if gpg_key
Gitlab::Gpg::CurrentKeyChain.add(gpg_key.key)
@verified_signature = nil
end
create_cached_signature!(gpg_key)
......@@ -50,6 +49,7 @@ module Gitlab
if gpg_key
Gitlab::Gpg::CurrentKeyChain.add(gpg_key.key)
@verified_signature = nil
end
yield gpg_key
......@@ -58,7 +58,7 @@ module Gitlab
def verified_signature
@verified_signature ||= GPGME::Crypto.new.verify(@signature_text, signed_text: @signed_text) do |verified_signature|
return verified_signature
break verified_signature
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment