Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2017-09-27 20:28:50 +0300
committerRubén Dávila <ruben@gitlab.com>2017-10-05 16:25:27 +0300
commitd0572d9aad2c434a040f11956a4c3feac1afdcf8 (patch)
tree9d3620b23483910815915c995d3f01b659660021 /lib/gitlab/gpg.rb
parent328f4a505bcd2e7b38f907a24df437f8c35bc3af (diff)
Refactor the extraction and generation of GPG subkeys
Diffstat (limited to 'lib/gitlab/gpg.rb')
-rw-r--r--lib/gitlab/gpg.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb
index be22a9e0fe2..343bf54a6ae 100644
--- a/lib/gitlab/gpg.rb
+++ b/lib/gitlab/gpg.rb
@@ -43,12 +43,7 @@ module Gitlab
raw_keys.each_with_object(grouped_subkeys).each do |raw_key, subkeys|
primary_subkey_id = raw_key.primary_subkey.keyid
- raw_key.subkeys.each do |subkey|
- # Skip if current subkey is a master key
- next if primary_subkey_id == subkey.keyid
- # Skip if it isn't a sign key
- next if subkey.capability.exclude?(:sign)
-
+ raw_key.subkeys[1..-1].each do |subkey|
subkeys[primary_subkey_id] << { keyid: subkey.keyid, fingerprint: subkey.fingerprint }
end
end