spectre-ftp 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/spectre/ftp.rb +18 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9d52300a4b07d65b3aa3d788bb4c82dd5002af1b468b6ec21374f5c2e9bafcd
|
|
4
|
+
data.tar.gz: 0e6f3f63f3b62311cfd754e26fef084951f52afc2ba39ba1115293b0af672ed3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1be310ec08c5a0ae0ebe82f43442074617c06570d29730f2170ae44322184220d3730b61582035fc789782884365f844caf238167e4735b909d9529fa343c819
|
|
7
|
+
data.tar.gz: f7c01100edbc76d905070e361230241ea4636010cd4ab37d32b845db78ea2d3982d41b1525346ed703ea230dcf26bed01e9e5369f50a0fc71260d20b3af9a62a
|
data/lib/spectre/ftp.rb
CHANGED
|
@@ -291,19 +291,33 @@ module Spectre
|
|
|
291
291
|
@logger = logger
|
|
292
292
|
end
|
|
293
293
|
|
|
294
|
-
def ftps(name, config = {}, &)
|
|
295
|
-
config[:ssl] = true
|
|
294
|
+
def ftps(name, ca_file = nil, config = {}, &)
|
|
296
295
|
config[:port] ||= 990
|
|
297
296
|
config[:implicit] = true
|
|
298
297
|
|
|
298
|
+
if ca_file
|
|
299
|
+
config[:ssl] ||= {}
|
|
300
|
+
config[:ssl][:ca_file] = ca_file
|
|
301
|
+
config[:ssl][:verify_mode] ||= OpenSSL::SSL::VERIFY_PEER
|
|
302
|
+
else
|
|
303
|
+
config[:ssl] = config[:ssl] || true
|
|
304
|
+
end
|
|
305
|
+
|
|
299
306
|
ftp(name, config, &)
|
|
300
307
|
end
|
|
301
308
|
|
|
302
|
-
def ftpes(name, config = {}, &)
|
|
303
|
-
config[:ssl] = true
|
|
309
|
+
def ftpes(name, ca_file = nil, config = {}, &)
|
|
304
310
|
config[:port] ||= 21
|
|
305
311
|
config[:implicit] = false
|
|
306
312
|
|
|
313
|
+
if ca_file
|
|
314
|
+
config[:ssl] ||= {}
|
|
315
|
+
config[:ssl][:ca_file] = ca_file
|
|
316
|
+
config[:ssl][:verify_mode] ||= OpenSSL::SSL::VERIFY_PEER
|
|
317
|
+
else
|
|
318
|
+
config[:ssl] = config[:ssl] || true
|
|
319
|
+
end
|
|
320
|
+
|
|
307
321
|
ftp(name, config, &)
|
|
308
322
|
end
|
|
309
323
|
|