gitlab-labkit 0.27.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gitlab-labkit.gemspec +1 -1
- data/lib/labkit/fips.rb +6 -2
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 959c572170b2eacd0d0886603f9bac07fea6e85d45b12a66f8048a822d0ac2f8
|
4
|
+
data.tar.gz: 8e63111f0c1fb923f482a68845a2c92f550323e63f048a633f06ef7b5dd63135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6a475fa4b31747f731ddffc6fe0439795f060c7aa2e743d214ec9629708ecfd8c03abfd2532a6482a5ef5259f121333c113253fb13860487de1e345fbc75a30
|
7
|
+
data.tar.gz: 7f30c1a8cfb9a36313045bc2d1beed7df127bd97dd01deba6880eba4e7c6f82bd2705cb30d2759dd6f01579dd46652e4d07e1eef67a792f7087f6e3d4f451f26
|
data/gitlab-labkit.gemspec
CHANGED
@@ -42,6 +42,6 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_development_dependency "rspec", "~> 3.10.0"
|
43
43
|
spec.add_development_dependency "rspec-parameterized", "~> 0.4"
|
44
44
|
spec.add_development_dependency "rufo", "0.9.0"
|
45
|
-
spec.add_development_dependency "sidekiq", ">= 5.2"
|
45
|
+
spec.add_development_dependency "sidekiq", ">= 5.2", "< 7"
|
46
46
|
spec.add_development_dependency "webrick", "~> 1.7.0"
|
47
47
|
end
|
data/lib/labkit/fips.rb
CHANGED
@@ -18,18 +18,22 @@ module Labkit
|
|
18
18
|
#
|
19
19
|
# @return [Boolean]
|
20
20
|
def enabled?
|
21
|
-
#
|
22
|
-
return
|
21
|
+
# Check if it set manually to false
|
22
|
+
return false if %w[0 false no].include?(ENV["FIPS_MODE"])
|
23
23
|
|
24
24
|
# Otherwise allow it to be set manually via the env vars
|
25
25
|
return true if %w[1 true yes].include?(ENV["FIPS_MODE"])
|
26
26
|
|
27
|
+
# Otherwise, attempt to auto-detect FIPS mode from OpenSSL
|
28
|
+
return true if OpenSSL.fips_mode
|
29
|
+
|
27
30
|
false
|
28
31
|
end
|
29
32
|
|
30
33
|
# Swap Ruby's Digest::SHAx implementations for OpenSSL::Digest::SHAx.
|
31
34
|
def enable_fips_mode!
|
32
35
|
require "digest"
|
36
|
+
require "digest/sha1"
|
33
37
|
require "digest/sha2"
|
34
38
|
|
35
39
|
::Digest::SHA2.singleton_class.prepend(Labkit::Digest::SHA2)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-labkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Newdigate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -329,6 +329,9 @@ dependencies:
|
|
329
329
|
- - ">="
|
330
330
|
- !ruby/object:Gem::Version
|
331
331
|
version: '5.2'
|
332
|
+
- - "<"
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '7'
|
332
335
|
type: :development
|
333
336
|
prerelease: false
|
334
337
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -336,6 +339,9 @@ dependencies:
|
|
336
339
|
- - ">="
|
337
340
|
- !ruby/object:Gem::Version
|
338
341
|
version: '5.2'
|
342
|
+
- - "<"
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
version: '7'
|
339
345
|
- !ruby/object:Gem::Dependency
|
340
346
|
name: webrick
|
341
347
|
requirement: !ruby/object:Gem::Requirement
|