zencoder 2.4.6 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +25 -1
- data/lib/zencoder/http.rb +0 -2
- data/lib/zencoder/http/net_http.rb +6 -3
- data/lib/zencoder/http/typhoeus.rb +8 -0
- data/lib/zencoder/version.rb +1 -1
- metadata +2 -3
- data/lib/zencoder/http/resources/zencoder_ca_chain.crt +0 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
|
4
|
-
|
3
|
+
data.tar.gz: a294f0ff19c60db70d7599036852febc63e759dca261879450455b68b56f287ebf6715ce15c86e8549a8f1c73463208a9d21bb5f0f7107c0d90e17b1dbc97f73
|
4
|
+
metadata.gz: 726e657308c6ea25c41e3869082f50cea083c88afe47c6bfad51bea9a129f12b568f8a2a9ed1984513c41865368e30d9c06896a5c620d41b8fb081745345645e
|
5
5
|
SHA1:
|
6
|
-
|
7
|
-
|
6
|
+
data.tar.gz: 3dbdc5a1e0fa815d5459bf1c6b7a1a505cf4d9d6
|
7
|
+
metadata.gz: 43159bc2341a7f9c16df6d30d2a2fc3b85c1925a
|
data/README.markdown
CHANGED
@@ -15,6 +15,12 @@ Tested on the following versions of Ruby:
|
|
15
15
|
* Rubinius 2.0.0dev
|
16
16
|
* jRuby 1.6.5
|
17
17
|
|
18
|
+
## 2.5 WARNING!!!
|
19
|
+
|
20
|
+
Version 2.5 brings a single, significant change to the gem which you should be aware of:
|
21
|
+
|
22
|
+
* __The Zencoder SSL CA chain is no longer bundled.__ Our cert is expiring and the necessary file may change in the future. You can now specify the CA file or CA path along with the request.
|
23
|
+
|
18
24
|
## v2.4 WARNING!!!
|
19
25
|
|
20
26
|
Version 2.4 brings some significant changes to the gem, ones which you should be aware of:
|
@@ -335,7 +341,25 @@ Zencoder::Job.create({:input => 's3://bucket/key.mp4'}, {:timeout => 1000})
|
|
335
341
|
|
336
342
|
### SSL Verification
|
337
343
|
|
338
|
-
|
344
|
+
SSL verification using the default Net::HTTP backend requires that your ruby be appropriately configured with up to date path to a cert bundle on your system or by specifying the a CA file or CA path when sending requests.
|
345
|
+
|
346
|
+
```ruby
|
347
|
+
Zencoder::Job.create({:input => 's3://bucket/key.mp4'}, {:ca_path => "/path/to/certs/"})
|
348
|
+
# or
|
349
|
+
Zencoder::Job.create({:input => 's3://bucket/key.mp4'}, {:ca_file => "/path/to/certs/zen.crt"})
|
350
|
+
```
|
351
|
+
|
352
|
+
Alternatively you can add it to the default options.
|
353
|
+
|
354
|
+
```ruby
|
355
|
+
Zencoder::HTTP.default_options.merge!(:ca_path => "/path/to/certs/")
|
356
|
+
# or
|
357
|
+
Zencoder::HTTP.default_options.merge!(:ca_file => "/path/to/certs/zen.crt")
|
358
|
+
```
|
359
|
+
|
360
|
+
You can get a CA bundle from [the curl website](http://curl.haxx.se/docs/caextract.html), but it is recommended that you use your system's package manager to install these certs and keep them up to date.
|
361
|
+
|
362
|
+
However, if you'd like to skip SSL verification you can pass an option in the secondary options hash.
|
339
363
|
|
340
364
|
**NOTE: WE HIGHLY DISCOURAGE THIS! THIS WILL LEAVE YOU VULNERABLE TO MAN-IN-THE-MIDDLE ATTACKS!**
|
341
365
|
|
data/lib/zencoder/http.rb
CHANGED
@@ -2,7 +2,7 @@ module Zencoder
|
|
2
2
|
class HTTP
|
3
3
|
class NetHTTP
|
4
4
|
|
5
|
-
attr_accessor :method, :url, :uri, :body, :params, :headers, :timeout, :skip_ssl_verify, :options
|
5
|
+
attr_accessor :method, :url, :uri, :body, :params, :headers, :timeout, :skip_ssl_verify, :options, :ca_file, :ca_path
|
6
6
|
|
7
7
|
def initialize(method, url, options)
|
8
8
|
@method = method
|
@@ -13,6 +13,8 @@ module Zencoder
|
|
13
13
|
@headers = @options.delete(:headers)
|
14
14
|
@timeout = @options.delete(:timeout)
|
15
15
|
@skip_ssl_verify = @options.delete(:skip_ssl_verify)
|
16
|
+
@ca_file = @options.delete(:ca_file)
|
17
|
+
@ca_path = @options.delete(:ca_path)
|
16
18
|
end
|
17
19
|
|
18
20
|
def self.post(url, options={})
|
@@ -59,10 +61,11 @@ module Zencoder
|
|
59
61
|
if skip_ssl_verify
|
60
62
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
61
63
|
else
|
62
|
-
http.ca_file = Zencoder::HTTP::CA_CHAIN_PATH
|
63
64
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
64
|
-
http.verify_depth = 5
|
65
65
|
end
|
66
|
+
|
67
|
+
http.ca_file = ca_file if ca_file
|
68
|
+
http.ca_path = ca_path if ca_path
|
66
69
|
end
|
67
70
|
|
68
71
|
http
|
@@ -24,6 +24,14 @@ module Zencoder
|
|
24
24
|
options[:disable_ssl_peer_verification] = true
|
25
25
|
end
|
26
26
|
|
27
|
+
if ca_file = options.delete(:ca_file)
|
28
|
+
options[:sslcert] = ca_file
|
29
|
+
end
|
30
|
+
|
31
|
+
if ca_path = options.delete(:ca_path)
|
32
|
+
options[:capath] = ca_path
|
33
|
+
end
|
34
|
+
|
27
35
|
::Typhoeus::Request.send(method, url, options)
|
28
36
|
end
|
29
37
|
|
data/lib/zencoder/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zencoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Sutton
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-07-23 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -59,7 +59,6 @@ files:
|
|
59
59
|
- lib/zencoder/account.rb
|
60
60
|
- lib/zencoder/errors.rb
|
61
61
|
- lib/zencoder/http/net_http.rb
|
62
|
-
- lib/zencoder/http/resources/zencoder_ca_chain.crt
|
63
62
|
- lib/zencoder/http/typhoeus.rb
|
64
63
|
- lib/zencoder/http.rb
|
65
64
|
- lib/zencoder/input.rb
|
@@ -1,62 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
|
3
|
-
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
|
4
|
-
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
|
5
|
-
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
|
6
|
-
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
|
7
|
-
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
|
8
|
-
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
|
9
|
-
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
|
10
|
-
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
|
11
|
-
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
|
12
|
-
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
|
13
|
-
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
|
14
|
-
ug2SBhRz1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