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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79846c3feb1b3287ef00d0f55b81ee788745bd5e9834849686061d3ec533cd8a
4
- data.tar.gz: 527270e43d3a430155932fa3fd133be491ae572196f830e1f3464ff3fe0d4144
3
+ metadata.gz: 959c572170b2eacd0d0886603f9bac07fea6e85d45b12a66f8048a822d0ac2f8
4
+ data.tar.gz: 8e63111f0c1fb923f482a68845a2c92f550323e63f048a633f06ef7b5dd63135
5
5
  SHA512:
6
- metadata.gz: bdf9d4b68fa887ddaf7763a21637cdafe0937dd6f6aef355c71178e8f52c960b7726f9060364c4d254e75e83014764baddfa8545a27818b92fb0409fb422dabd
7
- data.tar.gz: 1926fbefa4446482eb4a9ed7af240eecb2c6b5af6a8e6cc444d67ca7c95bb252853729b771bf29984437e0843396bfac9e188031a29f29913cf61d9f97f6a183
6
+ metadata.gz: e6a475fa4b31747f731ddffc6fe0439795f060c7aa2e743d214ec9629708ecfd8c03abfd2532a6482a5ef5259f121333c113253fb13860487de1e345fbc75a30
7
+ data.tar.gz: 7f30c1a8cfb9a36313045bc2d1beed7df127bd97dd01deba6880eba4e7c6f82bd2705cb30d2759dd6f01579dd46652e4d07e1eef67a792f7087f6e3d4f451f26
@@ -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
- # Attempt to auto-detect FIPS mode from OpenSSL
22
- return true if OpenSSL.fips_mode
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.27.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-10-27 00:00:00.000000000 Z
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