@@ -191,19 +191,14 @@ public function connect($host, $port = 80, $secure = false)
191191 $ this ->config ['sslverifypeer ' ])) {
192192 throw new AdapterException \RuntimeException ('Unable to set sslverifypeer option ' );
193193 }
194- if ($ this ->config ['sslverifypeer ' ] == true ) {
195- if ($ this ->config ['sslcapath ' ] == null || !is_dir ($ this ->config ['sslcapath ' ])) {
196- throw new AdapterException \RuntimeException ('Invalid sslcapath provided; not a directory ' );
197- }
198- if (! stream_context_set_option ($ context , 'ssl ' , 'capath ' ,
199- $ this ->config ['sslcapath ' ])) {
200- throw new AdapterException \RuntimeException ('Unable to set sslcapath option ' );
201- }
202- if ($ this ->config ['sslallowselfsigned ' ] !== null ) {
203- if (! stream_context_set_option ($ context , 'ssl ' , 'allow_self_signed ' ,
204- $ this ->config ['sslallowselfsigned ' ])) {
205- throw new AdapterException \RuntimeException ('Unable to set sslallowselfsigned option ' );
206- }
194+ if (! stream_context_set_option ($ context , 'ssl ' , 'capath ' ,
195+ $ this ->config ['sslcapath ' ])) {
196+ throw new AdapterException \RuntimeException ('Unable to set sslcapath option ' );
197+ }
198+ if ($ this ->config ['sslallowselfsigned ' ] !== null ) {
199+ if (! stream_context_set_option ($ context , 'ssl ' , 'allow_self_signed ' ,
200+ $ this ->config ['sslallowselfsigned ' ])) {
201+ throw new AdapterException \RuntimeException ('Unable to set sslallowselfsigned option ' );
207202 }
208203 }
209204 }
0 commit comments