-
-
Save kosikond/08178655939bfa9d7063 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Fix SSL Versions & Cloudflare ECDSA | |
| * Description: Remove SSL v1-3 from cURL Requests. PHP v5.5.19+/5.6.3+ only | |
| * Author: Ondra Kosik <ondra@kosik.co.uk> | |
| * Author URl: http://kosik.co.uk | |
| * License: MIT | |
| */ | |
| add_action( 'http_api_curl', function( $args ) | |
| { | |
| curl_setopt( | |
| $args[0], | |
| CURLOPT_SSLVERSION, | |
| CURL_SSLVERSION_TLSv1_2 | |
| | CURL_SSLVERSION_TLSv1_1 | |
| | CURL_SSLVERSION_TLSv1_0 | |
| ); | |
| curl_setopt($args[O], CURLOPT_SSL_CIPHER_LIST, 'ecdhe_ecdsa_aes_128_sha'); | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment