Skip to content

Commit df4e8e3

Browse files
committed
add note to disable sslv3
1 parent 66bb48c commit df4e8e3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

source/Code_Examples/php.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ curl_setopt ($session, CURLOPT_POST, true);
4343
curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
4444
// Tell curl not to return headers, but do return the response
4545
curl_setopt($session, CURLOPT_HEADER, false);
46+
// Tell PHP not to use SSLv3 (instead opting for TLS)
47+
curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
4648
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
4749

4850
// obtain response
@@ -97,6 +99,8 @@ curl_setopt ($session, CURLOPT_POST, true);
9799
curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
98100
// Tell curl not to return headers, but do return the response
99101
curl_setopt($session, CURLOPT_HEADER, false);
102+
// Tell PHP not to use SSLv3 (instead opting for TLS)
103+
curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
100104
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
101105

102106
// obtain response
@@ -149,6 +153,8 @@ curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
149153

150154
// Tell curl not to return headers, but do return the response
151155
curl_setopt($session, CURLOPT_HEADER, false);
156+
// Tell PHP not to use SSLv3 (instead opting for TLS)
157+
curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
152158
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
153159

154160
// obtain response

0 commit comments

Comments
 (0)