summaryrefslogtreecommitdiff
path: root/lib/gitlab/gpg.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-13 15:22:15 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 15:44:39 +0200
commitcd01e82873b3cd471203dbf557c71571fd683d16 (patch)
tree08372f91287ec4c9a14d95044a0eff7fbe8e78c3 /lib/gitlab/gpg.rb
parent506836a695ae40ff200add21c639f3d13aaee9e9 (diff)
downloadgitlab-ce-cd01e82873b3cd471203dbf557c71571fd683d16.tar.gz
store gpg user name and email on the signature
Diffstat (limited to 'lib/gitlab/gpg.rb')
-rw-r--r--lib/gitlab/gpg.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb
index 582347019e5..e1d1724295a 100644
--- a/lib/gitlab/gpg.rb
+++ b/lib/gitlab/gpg.rb
@@ -32,11 +32,13 @@ module Gitlab
end
end
- def emails_from_key(key)
+ def user_infos_from_key(key)
using_tmp_keychain do
fingerprints = CurrentKeyChain.fingerprints_from_key(key)
- GPGME::Key.find(:public, fingerprints).flat_map { |raw_key| raw_key.uids.map(&:email) }
+ GPGME::Key.find(:public, fingerprints).flat_map do |raw_key|
+ raw_key.uids.map { |uid| { name: uid.name, email: uid.email } }
+ end
end
end