net-http-persistent 1.9 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +7 -0
- data/lib/net/http/persistent.rb +9 -9
- data/test/test_net_http_persistent.rb +1 -1
- metadata +4 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 2.0 / 2011-08-26
|
2
|
+
|
3
|
+
* Incompatibility
|
4
|
+
* Net::HTTP::Persistent#verify_mode now defaults to
|
5
|
+
OpenSSL::SSL::VERIFY_PEER. This may cause HTTPS request failures if your
|
6
|
+
default certificate store lacks the correct certificates.
|
7
|
+
|
1
8
|
=== 1.9 / 2011-08-26
|
2
9
|
|
3
10
|
* Minor Enhancement
|
data/lib/net/http/persistent.rb
CHANGED
@@ -43,7 +43,7 @@ class Net::HTTP::Persistent
|
|
43
43
|
##
|
44
44
|
# The version of Net::HTTP::Persistent use are using
|
45
45
|
|
46
|
-
VERSION = '
|
46
|
+
VERSION = '2.0'
|
47
47
|
|
48
48
|
##
|
49
49
|
# Error class for errors raised by Net::HTTP::Persistent. Various
|
@@ -152,12 +152,14 @@ class Net::HTTP::Persistent
|
|
152
152
|
attr_accessor :verify_callback
|
153
153
|
|
154
154
|
##
|
155
|
-
# HTTPS verify mode. Defaults to OpenSSL::SSL::
|
156
|
-
# certificate
|
155
|
+
# HTTPS verify mode. Defaults to OpenSSL::SSL::VERIFY_PEER which verifies
|
156
|
+
# the server certificate.
|
157
157
|
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
158
|
+
# If no certificate, ca_file or cert_store is set the default system
|
159
|
+
# certificate store is used.
|
160
|
+
#
|
161
|
+
# To disable server certificate validation set to OpenSSL::SSL::VERIFY_NONE,
|
162
|
+
# but this is a bad idea as it disables SSL protections.
|
161
163
|
#
|
162
164
|
# You can use +verify_mode+ to override any default values.
|
163
165
|
|
@@ -520,8 +522,7 @@ class Net::HTTP::Persistent
|
|
520
522
|
def ssl connection
|
521
523
|
connection.use_ssl = true
|
522
524
|
|
523
|
-
|
524
|
-
connection.verify_mode = OpenSSL::SSL::VERIFY_NONE unless @verify_mode
|
525
|
+
connection.verify_mode = OpenSSL::SSL::VERIFY_PEER unless @verify_mode
|
525
526
|
|
526
527
|
if @ca_file then
|
527
528
|
connection.ca_file = @ca_file
|
@@ -545,7 +546,6 @@ class Net::HTTP::Persistent
|
|
545
546
|
store
|
546
547
|
end
|
547
548
|
end
|
548
|
-
|
549
549
|
end
|
550
550
|
|
551
551
|
end
|
@@ -758,7 +758,7 @@ class TestNetHttpPersistent < MiniTest::Unit::TestCase
|
|
758
758
|
@http.ssl c
|
759
759
|
|
760
760
|
assert c.use_ssl?
|
761
|
-
assert_equal OpenSSL::SSL::
|
761
|
+
assert_equal OpenSSL::SSL::VERIFY_PEER, c.verify_mode
|
762
762
|
assert_nil c.verify_callback
|
763
763
|
end
|
764
764
|
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-http-persistent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: "
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: "2.0"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eric Hodel
|
metadata.gz.sig
CHANGED
Binary file
|