net-ssh 7.2.1.rc1 → 7.2.2.rc1

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: a17dfe9f90130318edc6753cf4f4a203a840425f3b08ba3c9613c2d64f619d00
4
- data.tar.gz: d8b3be6e4d44328462c85dd423cf29a7089aae1ea2fe838859b8be798915a234
3
+ metadata.gz: ba7dc2e01f8cfd95a6f25deae61e255e89c6415ec80e9969742c115c3578a347
4
+ data.tar.gz: 672b7436dad25481920fcac8f05075553ed5e4098a11c0ef4a272c628c3418bb
5
5
  SHA512:
6
- metadata.gz: 86f2886564ba68702ae6e82ed911af1912688b5104d79455510654109b72971ede576e2255bf88ef756a03be00f815c7f5320d5a1e24f63cac8261940e1bbad8
7
- data.tar.gz: 6262e90adef7ef84d991295a6ba53bb0f4504b9ad3587674149a6cb619426f03ce578ab5032097b0bbdcfc4424252bdf3138a4bca98debae4dbc9f03e19f0b4a
6
+ metadata.gz: 9a03b12742306789f7b8fb85015d4f7dac2613553302d809e5f1757a39b3f42ece45901aeddbf06e060142bef7127f49fe76067d0d5e6793b54c88dfc81bd186
7
+ data.tar.gz: 32569db94640aa6337c4084de009e9e607ba162d09881b11fde756254ab332085c6e36774f096c712341e31a5dd940cd33821faf94fa2651cdcb4d86c371f53b
checksums.yaml.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -100,7 +100,7 @@ def change_version(&block)
100
100
  f.write(line)
101
101
  end
102
102
  raise ArgumentError, "Cound not find line: PRE = \"#{pre}\" in #{version_file}" unless found[:pre]
103
- raise ArgumentError, "Cound not find line: TINY = \"#{tiny}\" in #{version_file}" unless found[:tiny]
103
+ raise ArgumentError, "Cound not find line: TINY = \"#{tiny}\" in #{version_file}" unless found[:tiny] || new_tiny == tiny
104
104
  end
105
105
 
106
106
  FileUtils.mv version_file, "#{version_file}.old"
@@ -110,7 +110,8 @@ end
110
110
  namespace :vbump do
111
111
  desc "Final release"
112
112
  task :final do
113
- change_version do |pre:|
113
+ change_version do |pre:, tiny:|
114
+ _ = tiny
114
115
  raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
115
116
 
116
117
  { pre: nil }
@@ -46,7 +46,7 @@ module Net
46
46
  raise ArgumentError.new("Expected #{MEND} at end of private key") unless datafull.end_with?(MEND)
47
47
 
48
48
  datab64 = datafull[MBEGIN.size...-MEND.size]
49
- data = Base64.decode64(datab64)
49
+ data = datab64.unpack1("m")
50
50
  raise ArgumentError.new("Expected #{MAGIC} at start of decoded private key") unless data.start_with?(MAGIC)
51
51
 
52
52
  buffer = Net::SSH::Buffer.new(data[MAGIC.size + 1..-1])
@@ -134,7 +134,7 @@ module Net
134
134
 
135
135
  def to_pem
136
136
  # TODO this is not pem
137
- ssh_type + Base64.encode64(@verify_key.to_bytes)
137
+ ssh_type + [@verify_key.to_bytes].pack("m")
138
138
  end
139
139
  end
140
140
 
@@ -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
@@ -241,11 +241,11 @@ module Net
241
241
  def known_host_hash?(hostlist, entries)
242
242
  if hostlist.size == 1 && hostlist.first =~ /\A\|1(\|.+){2}\z/
243
243
  chunks = hostlist.first.split(/\|/)
244
- salt = Base64.decode64(chunks[2])
244
+ salt = chunks[2].unpack1("m")
245
245
  digest = OpenSSL::Digest.new('sha1')
246
246
  entries.each do |entry|
247
247
  hmac = OpenSSL::HMAC.digest(digest, salt, entry)
248
- return true if Base64.encode64(hmac).chomp == chunks[3]
248
+ return true if [hmac].pack("m").chomp == chunks[3]
249
249
  end
250
250
  end
251
251
  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 = 2
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
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.rc1
4
+ version: 7.2.2.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -31,7 +31,7 @@ cert_chain:
31
31
  v84waVXQ2i5M7pJaHVBF7DxxeW/q8W3VCnsq8vmmvULSThD18QqYGaFDJeN8sTR4
32
32
  6tfjgZ6OvGSScvbCMHkCE9XjonE=
33
33
  -----END CERTIFICATE-----
34
- date: 2023-12-16 00:00:00.000000000 Z
34
+ date: 2024-01-05 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bcrypt_pbkdf
@@ -89,6 +89,20 @@ dependencies:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
91
  version: '7.1'
92
+ - !ruby/object:Gem::Dependency
93
+ name: base64
94
+ requirement: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
92
106
  - !ruby/object:Gem::Dependency
93
107
  name: bundler
94
108
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file