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:
Diffstat (limited to 'lib/gitlab/fips.rb')
-rw-r--r--lib/gitlab/fips.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gitlab/fips.rb b/lib/gitlab/fips.rb
index 1dd363ceb17..97813f13a91 100644
--- a/lib/gitlab/fips.rb
+++ b/lib/gitlab/fips.rb
@@ -5,6 +5,17 @@ module Gitlab
class FIPS
# A simple utility class for FIPS-related helpers
+ Technology = Gitlab::SSHPublicKey::Technology
+
+ SSH_KEY_TECHNOLOGIES = [
+ Technology.new(:rsa, SSHData::PublicKey::RSA, [3072, 4096], %w(ssh-rsa)),
+ Technology.new(:dsa, SSHData::PublicKey::DSA, [], %w(ssh-dss)),
+ Technology.new(:ecdsa, SSHData::PublicKey::ECDSA, [256, 384, 521], %w(ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521)),
+ Technology.new(:ed25519, SSHData::PublicKey::ED25519, [256], %w(ssh-ed25519)),
+ Technology.new(:ecdsa_sk, SSHData::PublicKey::SKECDSA, [256], %w(sk-ecdsa-sha2-nistp256@openssh.com)),
+ Technology.new(:ed25519_sk, SSHData::PublicKey::SKED25519, [256], %w(sk-ssh-ed25519@openssh.com))
+ ].freeze
+
class << self
# Returns whether we should be running in FIPS mode or not
#