diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-09-27 20:28:50 +0300 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2017-10-05 16:25:27 +0300 |
commit | d0572d9aad2c434a040f11956a4c3feac1afdcf8 (patch) | |
tree | 9d3620b23483910815915c995d3f01b659660021 /lib/gitlab/gpg.rb | |
parent | 328f4a505bcd2e7b38f907a24df437f8c35bc3af (diff) |
Refactor the extraction and generation of GPG subkeys
Diffstat (limited to 'lib/gitlab/gpg.rb')
-rw-r--r-- | lib/gitlab/gpg.rb | 7 |
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 |