|  | 
| 73 | 73 | # #verify_callback    :: For server certificate verification | 
| 74 | 74 | # #verify_depth       :: Depth of certificate verification | 
| 75 | 75 | # #verify_mode        :: How connections should be verified | 
|  | 76 | +# #verify_hostname    :: Use hostname verification for server certificate | 
|  | 77 | +#                        during the handshake | 
| 76 | 78 | # | 
| 77 | 79 | # == Proxies | 
| 78 | 80 | # | 
| @@ -448,16 +450,17 @@ def self.detect_idle_timeout uri, max = 10 | 
| 448 | 450 |   attr_reader :verify_mode | 
| 449 | 451 | 
 | 
| 450 | 452 |   ## | 
| 451 |  | -  # HTTPS verify_hostname.  Defaults to false. | 
|  | 453 | +  # HTTPS verify_hostname. | 
| 452 | 454 |   # | 
| 453 | 455 |   # If a client sets this to true and enables SNI with SSLSocket#hostname=, | 
| 454 | 456 |   # the hostname verification on the server certificate is performed | 
| 455 | 457 |   # automatically during the handshake using | 
| 456 | 458 |   # OpenSSL::SSL.verify_certificate_identity(). | 
| 457 | 459 |   # | 
| 458 |  | -  # @See https://github.com/ruby/openssl/pull/60 | 
|  | 460 | +  # You can set +verify_hostname+ as true to use hostname verification | 
|  | 461 | +  # during the handshake. | 
| 459 | 462 |   # | 
| 460 |  | -  # You can use +verify_hostname+ to override any default values. | 
|  | 463 | +  # NOTE: This may work with Ruby > 2.8. | 
| 461 | 464 | 
 | 
| 462 | 465 |   attr_reader :verify_hostname | 
| 463 | 466 | 
 | 
| @@ -978,8 +981,8 @@ def ssl connection | 
| 978 | 981 |     connection.min_version = @min_version if @min_version | 
| 979 | 982 |     connection.max_version = @max_version if @max_version | 
| 980 | 983 | 
 | 
| 981 |  | -    connection.verify_depth = @verify_depth | 
| 982 |  | -    connection.verify_mode  = @verify_mode | 
|  | 984 | +    connection.verify_depth    = @verify_depth | 
|  | 985 | +    connection.verify_mode     = @verify_mode | 
| 983 | 986 |     connection.verify_hostname = @verify_hostname if | 
| 984 | 987 |       @verify_hostname && connection.respond_to?(:verify_hostname=) | 
| 985 | 988 | 
 | 
|  | 
0 commit comments