gitlab-labkit 0.28.0 → 0.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/labkit/fips.rb +5 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7858d4755aa67f53d9ec232cfba39e8ee1245cea7e19a27a902e37fb3a80fda
4
- data.tar.gz: f730b09600a2d855a1391ef7c10538cdaa757838cef2ca7daff2d1a0349be3e3
3
+ metadata.gz: 959c572170b2eacd0d0886603f9bac07fea6e85d45b12a66f8048a822d0ac2f8
4
+ data.tar.gz: 8e63111f0c1fb923f482a68845a2c92f550323e63f048a633f06ef7b5dd63135
5
5
  SHA512:
6
- metadata.gz: 878574f3a7c26400e6ea7fcfbc2c4d16fc7f86cec1f9651dfad977d07a1bf203c6ef3ab843a3c996b3c0a6c17bbf5e847d23d7a2ab160c559f7617a24d9d9345
7
- data.tar.gz: 4b7aea548f16103da6ac81aa8a9a195efdc952feaa13860415fc50ab028eb0e5ce76c4283d10b7e2f03807573ca2717de2386e9becdd0ec7031c18658495b27b
6
+ metadata.gz: e6a475fa4b31747f731ddffc6fe0439795f060c7aa2e743d214ec9629708ecfd8c03abfd2532a6482a5ef5259f121333c113253fb13860487de1e345fbc75a30
7
+ data.tar.gz: 7f30c1a8cfb9a36313045bc2d1beed7df127bd97dd01deba6880eba4e7c6f82bd2705cb30d2759dd6f01579dd46652e4d07e1eef67a792f7087f6e3d4f451f26
data/lib/labkit/fips.rb CHANGED
@@ -18,12 +18,15 @@ 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
 
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.28.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-28 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