Skip to content

Commit dc3ea83

Browse files
authored
Merge pull request #37 from cburschka-pwc/pr/37-ignore-ssl-errors
Only ignore SSL errors if the setting is active.
2 parents 6c54c9d + df2df7c commit dc3ea83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Client.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,12 @@ public function getSoapResponse( $soapUrl, $content, $throwException = true ) {
11041104
curl_setopt( $cURLHandle, CURLOPT_URL, $soapUrl );
11051105
curl_setopt( $cURLHandle, CURLOPT_RETURNTRANSFER, 1 );
11061106
curl_setopt( $cURLHandle, CURLOPT_TIMEOUT, self::$connectorTimeout );
1107-
curl_setopt( $cURLHandle, CURLOPT_SSL_VERIFYPEER, 0 );
1108-
curl_setopt( $cURLHandle, CURLOPT_SSL_VERIFYHOST, 0 );
1107+
1108+
if ( $this->settings->ignoreSslErrors ) {
1109+
curl_setopt( $cURLHandle, CURLOPT_SSL_VERIFYPEER, 0 );
1110+
curl_setopt( $cURLHandle, CURLOPT_SSL_VERIFYHOST, 0 );
1111+
}
1112+
11091113
curl_setopt( $cURLHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
11101114
curl_setopt( $cURLHandle, CURLOPT_HTTPHEADER, $headers );
11111115
curl_setopt( $cURLHandle, CURLOPT_POST, 1 );

0 commit comments

Comments
 (0)