vault 0.18.0 → 0.18.2

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: 111fe5b36f83c0d507ec99a0fda7a8cb7a483136f29a0a709dececfa0f1965ed
4
- data.tar.gz: 970b448a78d140f8ebaf289bf597ca47ebc25516a189fe1d615ed47d2a8fa671
3
+ metadata.gz: 476b00af55107f31b54a20b77e1f451aef3d463908a457d7026fe669d0948547
4
+ data.tar.gz: 0072055306b85967a9a49abc230f2b1d5ed67521378825bfa2d7c849948cbc29
5
5
  SHA512:
6
- metadata.gz: 87854275263cc1e88d21be3e2e5eb9ed4d9fa3d61429df0901d1ed278c64ae667a92ffff95789766ee73fb7d132021125bcf6d7de63840c124d5dfe143c89838
7
- data.tar.gz: b18967dd085a2e02c2de9d0a7d8570d61069324dd17af21b9b7f2bec0a5382233cc75a534b39acf926947bc9cd4a85ab0b8c7207528961c70e0ee34e277c1ae4
6
+ metadata.gz: 7d0619e6569b4f7ca9543f04545be9aa2bd0fe89c531eac135458b80b51d0d55a2667eae79290a7aecb389a4893d9fb6841505faffe623e056ff50889633490e
7
+ data.tar.gz: ef620f96b924e63b51deab4021c97d3f1f548722028b41a55a8c9b3f5beca930369b2a7c6f7f3c5b561f4dfc98fd6c4b5e3ed66660bdc053aa8b2c4af316a439
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## v?.??.? (Unreleased)
4
4
 
5
+ ## v0.18.1 (September 14, 2023)
6
+
7
+ BUG FIXES
8
+
9
+ - Restored the ability to use this gem with older Ruby versions that do not have
10
+ the `OpenSSL::SSL::TLS1_2_VERSION` constant.
11
+
5
12
  ## v0.18.0 (September 14, 2023)
6
13
 
7
14
  IMPROVEMENTS
data/lib/vault/client.rb CHANGED
@@ -64,6 +64,13 @@ module Vault
64
64
  a << PersistentHTTP::Error
65
65
  end.freeze
66
66
 
67
+ # Vault requires at least TLS1.2
68
+ MIN_TLS_VERSION = if defined? OpenSSL::SSL::TLS1_2_VERSION
69
+ OpenSSL::SSL::TLS1_2_VERSION
70
+ else
71
+ "TLSv1_2"
72
+ end
73
+
67
74
  include Vault::Configurable
68
75
 
69
76
  # Create a new Client with the given options. Any options given take
@@ -112,8 +119,7 @@ module Vault
112
119
 
113
120
  @nhp.verify_mode = OpenSSL::SSL::VERIFY_PEER
114
121
 
115
- # Vault requires at least TLS1.2
116
- @nhp.min_version = OpenSSL::SSL::TLS1_2_VERSION
122
+ @nhp.min_version = MIN_TLS_VERSION
117
123
 
118
124
  # Only use secure ciphers
119
125
  @nhp.ciphers = ssl_ciphers
@@ -1043,7 +1043,15 @@ class PersistentHTTP
1043
1043
  connection.use_ssl = true
1044
1044
 
1045
1045
  connection.ciphers = @ciphers if @ciphers
1046
- connection.min_version = @min_version if @min_version
1046
+
1047
+ if @min_version
1048
+ if connection.respond_to? :min_version=
1049
+ connection.min_version = @min_version
1050
+ else
1051
+ connection.ssl_version = @min_version
1052
+ end
1053
+ end
1054
+
1047
1055
  connection.ssl_timeout = @ssl_timeout if @ssl_timeout
1048
1056
 
1049
1057
  connection.verify_depth = @verify_depth
data/lib/vault/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # SPDX-License-Identifier: MPL-2.0
3
3
 
4
4
  module Vault
5
- VERSION = "0.18.0"
5
+ VERSION = "0.18.2"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-14 00:00:00.000000000 Z
11
+ date: 2023-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sigv4