Changeset 1544
- Timestamp:
- 05/11/05 22:02:11 (4 years ago)
- Files:
-
- trunk/test/soap/ssl/test_ssl.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/test/soap/ssl/test_ssl.rb
r1541 r1544 131 131 @client.options["protocol.http.ssl_config.verify_callback"] = method(:verify_callback).to_proc 132 132 @verify_callback_called = false 133 # NG with String 133 134 begin 134 135 @client.hello_world("ssl client") … … 138 139 assert(@verify_callback_called) 139 140 end 140 # 141 # NG with Integer 142 @client.options["protocol.http.ssl_config.verify_depth"] = 0 143 begin 144 @client.hello_world("ssl client") 145 assert(false) 146 rescue OpenSSL::SSL::SSLError => ssle 147 assert_equal("certificate verify failed", ssle.message) 148 assert(@verify_callback_called) 149 end 150 # OK with empty 141 151 @client.options["protocol.http.ssl_config.verify_depth"] = "" 152 @verify_callback_called = false 153 assert_equal("Hello World, from ssl client", @client.hello_world("ssl client")) 154 assert(@verify_callback_called) 155 # OK with nil 156 @client.options["protocol.http.ssl_config.verify_depth"] = nil 157 @verify_callback_called = false 158 assert_equal("Hello World, from ssl client", @client.hello_world("ssl client")) 159 assert(@verify_callback_called) 160 # OK with String 161 @client.options["protocol.http.ssl_config.verify_depth"] = "3" 162 @verify_callback_called = false 163 assert_equal("Hello World, from ssl client", @client.hello_world("ssl client")) 164 assert(@verify_callback_called) 165 # OK with Integer 166 @client.options["protocol.http.ssl_config.verify_depth"] = 3 142 167 @verify_callback_called = false 143 168 assert_equal("Hello World, from ssl client", @client.hello_world("ssl client"))