net-ssh 7.2.1 → 7.2.3

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: a0040b76470d1aed1c201c0a67f043f84337adb1888bc0497209e264d2d533d3
4
- data.tar.gz: 14e6d8ccd37c1fa15eedba4ace1a1cf7d07cafea9c56c90f4978bd95ae16f773
3
+ metadata.gz: 524dafc8f2460b2e19662e19cb1916dc6b7f57b78b9cdc6ceadf486bc4fc1945
4
+ data.tar.gz: 1f400ebf2e8622ab81b348c6db7d45d88dfd3c3bd04e61bc60ea8678482f5f11
5
5
  SHA512:
6
- metadata.gz: b3fb3ccd42bed93a2f5c2e66a32c030dd0af0c60be0da4a3f35c573f25040c41d4692560a4a84f1f79e0d2a432245a3a4011cb1f1f4953c3855df1ec9cf0a5c1
7
- data.tar.gz: a09ad77463c1f988a342e8a0e6d379e748d11344c1db30255e162ddf4cc4002f4fc8ecfa66238a8107d39649999cb8fbce07369b1cb07b779091631c569cb53b
6
+ metadata.gz: 00c33f37023f2cb493b231ee924db6be810fb8d3505d085160c6d790bcd928856081321b5743c2829e773ba506fee8aa3e5a5e9c94ec705199fa77458ad8c17f
7
+ data.tar.gz: 195425e6e604b3dbe56cfabd2567b292cd40caa8affbd3f624901a2ddbcb024bacc052093722407a62070bfd3bacdce4c60aee6693a29ac20ad140ba2683fcc3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -7,7 +7,7 @@ jobs:
7
7
  runs-on: ubuntu-22.04
8
8
  strategy:
9
9
  matrix:
10
- ruby-version: [2.6.10, 2.7.7, 3.0.6, 3.1.3, 3.2.1, '3.3.0-rc1']
10
+ ruby-version: [2.6.10, 2.7.7, 3.0.6, 3.1.3, 3.2.1, 3.3.0]
11
11
  steps:
12
12
  - uses: actions/checkout@v3
13
13
 
data/CHANGES.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 7.2.2
2
+
3
+ * ruby 3.3.0: base64 fix
4
+
1
5
  === 7.2.1 rc1
2
6
 
3
7
  * feat: allow load of certkey from string [#926]
data/README.md CHANGED
@@ -248,6 +248,8 @@ mv gem-public_cert.pem net-ssh-public_cert.pem
248
248
  gem cert --add net-ssh-public_cert.pem
249
249
  ```
250
250
 
251
+ or `rake cert:update_public_when_expired`
252
+
251
253
  ## Security contact information
252
254
 
253
255
  See [SECURITY.md](SECURITY.md)
data/Rakefile CHANGED
@@ -61,7 +61,7 @@ def change_version(&block)
61
61
  pre = Net::SSH::Version::PRE
62
62
  tiny = Net::SSH::Version::TINY
63
63
  result = block[pre: pre, tiny: Net::SSH::Version::TINY]
64
- raise "Version change logic should always return a pre", ArgumentError unless result.key?(:pre)
64
+ raise ArgumentError, "Version change logic should always return a pre" unless result.key?(:pre)
65
65
 
66
66
  new_pre = result[:pre]
67
67
  new_tiny = result[:tiny] || tiny
@@ -112,9 +112,13 @@ namespace :vbump do
112
112
  task :final do
113
113
  change_version do |pre:, tiny:|
114
114
  _ = tiny
115
- raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
115
+ if pre.nil?
116
+ { tiny: tiny + 1, pre: nil }
117
+ else
118
+ raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
116
119
 
117
- { pre: nil }
120
+ { pre: nil }
121
+ end
118
122
  end
119
123
  end
120
124
 
@@ -3,8 +3,6 @@ gem 'bcrypt_pbkdf', '~> 1.0' unless RUBY_PLATFORM == "java"
3
3
 
4
4
  require 'ed25519'
5
5
 
6
- require 'base64'
7
-
8
6
  require 'net/ssh/transport/cipher_factory'
9
7
  require 'net/ssh/authentication/pub_key_fingerprint'
10
8
  require 'bcrypt_pbkdf' unless RUBY_PLATFORM == "java"
@@ -46,7 +44,7 @@ module Net
46
44
  raise ArgumentError.new("Expected #{MEND} at end of private key") unless datafull.end_with?(MEND)
47
45
 
48
46
  datab64 = datafull[MBEGIN.size...-MEND.size]
49
- data = Base64.decode64(datab64)
47
+ data = datab64.unpack1("m")
50
48
  raise ArgumentError.new("Expected #{MAGIC} at start of decoded private key") unless data.start_with?(MAGIC)
51
49
 
52
50
  buffer = Net::SSH::Buffer.new(data[MAGIC.size + 1..-1])
@@ -134,7 +132,7 @@ module Net
134
132
 
135
133
  def to_pem
136
134
  # TODO this is not pem
137
- ssh_type + Base64.encode64(@verify_key.to_bytes)
135
+ ssh_type + [@verify_key.to_bytes].pack("m")
138
136
  end
139
137
  end
140
138
 
@@ -32,7 +32,7 @@ module Net
32
32
  when 'MD5'
33
33
  OpenSSL::Digest.hexdigest(algorithm, blob).scan(/../).join(":")
34
34
  when 'SHA256'
35
- "SHA256:#{Base64.encode64(OpenSSL::Digest.digest(algorithm, blob)).chomp.gsub(/=+\z/, '')}"
35
+ "SHA256:#{[OpenSSL::Digest.digest(algorithm, blob)].pack('m').chomp.gsub(/=+\z/, '')}"
36
36
  else
37
37
  raise OpenSSL::Digest::DigestError, "unsupported ssh key digest #{algorithm}"
38
38
  end
@@ -1,6 +1,5 @@
1
1
  require 'strscan'
2
2
  require 'openssl'
3
- require 'base64'
4
3
  require 'delegate'
5
4
  require 'net/ssh/buffer'
6
5
  require 'net/ssh/authentication/ed25519_loader'
@@ -241,11 +240,11 @@ module Net
241
240
  def known_host_hash?(hostlist, entries)
242
241
  if hostlist.size == 1 && hostlist.first =~ /\A\|1(\|.+){2}\z/
243
242
  chunks = hostlist.first.split(/\|/)
244
- salt = Base64.decode64(chunks[2])
243
+ salt = chunks[2].unpack1("m")
245
244
  digest = OpenSSL::Digest.new('sha1')
246
245
  entries.each do |entry|
247
246
  hmac = OpenSSL::HMAC.digest(digest, salt, entry)
248
- return true if Base64.encode64(hmac).chomp == chunks[3]
247
+ return true if [hmac].pack("m").chomp == chunks[3]
249
248
  end
250
249
  end
251
250
  false
@@ -52,7 +52,7 @@ module Net
52
52
  MINOR = 2
53
53
 
54
54
  # The tiny component of this version of the Net::SSH library
55
- TINY = 1
55
+ TINY = 3
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
@@ -1,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G
15
+ 9w0BAQsFAAOCAQEAfY2WbsBKwRtBep4l+Y2/84H1BKH9UVOsFxqQzYkvM2LFDyup
16
+ UkjYf8nPSjg3mquhaiA5KSoSVUPpNDfQo+UvY3+mlxRs96ttWiUGwz27fy82rx1B
17
+ ZnfKjsWOntemNON6asOD0mtv0xsNBfOB2VNIKW/uqHsiPpa0OaVy5uENhX+5OFan
18
+ 2P1Uy+WcMiv38RlRkn4cdEIZUFupDgKFsguYlaJy473/wsae4exUgc5bvi3Splob
19
+ 1uE/LmB/qWBVSNW8e9KDtJynhDDZBlpESyQHFQCZj6UapzxlnC46LaDncPoAtJPc
20
+ MlWxJ8mKghIcyXc5y4cSyGypNG5BralqnvQUyg==
20
21
  -----END CERTIFICATE-----
data/net-ssh.gemspec CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
38
38
 
39
39
  spec.add_development_dependency('rbnacl', '~> 7.1') unless ENV['NET_SSH_NO_RBNACL']
40
40
 
41
+ spec.add_development_dependency "base64"
41
42
  spec.add_development_dependency "bundler", ">= 1.17"
42
43
  spec.add_development_dependency "minitest", "~> 5.19"
43
44
  spec.add_development_dependency "mocha", "~> 2.1.0"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.1
4
+ version: 7.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -12,26 +12,27 @@ bindir: exe
12
12
  cert_chain:
13
13
  - |
14
14
  -----BEGIN CERTIFICATE-----
15
- MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
16
- c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMzAxMjQwMzE3NTVaFw0yNDAxMjQw
17
- MzE3NTVaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9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n4cdEIZUFupDgKFsguYlaJy473/wsae4exUgc5bvi3Splob
32
+ 1uE/LmB/qWBVSNW8e9KDtJynhDDZBlpESyQHFQCZj6UapzxlnC46LaDncPoAtJPc
33
+ MlWxJ8mKghIcyXc5y4cSyGypNG5BralqnvQUyg==
33
34
  -----END CERTIFICATE-----
34
- date: 2023-12-19 00:00:00.000000000 Z
35
+ date: 2024-04-02 00:00:00.000000000 Z
35
36
  dependencies:
36
37
  - !ruby/object:Gem::Dependency
37
38
  name: bcrypt_pbkdf
@@ -89,6 +90,20 @@ dependencies:
89
90
  - - "~>"
90
91
  - !ruby/object:Gem::Version
91
92
  version: '7.1'
93
+ - !ruby/object:Gem::Dependency
94
+ name: base64
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
92
107
  - !ruby/object:Gem::Dependency
93
108
  name: bundler
94
109
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file