The public platform adjusts the SSL security policy and the developer's Upgrade Method

Source: Internet
Author: User
The public platform adjusts the SSL security policy. Please upgrade it.

 

In recent times, https encryption protocol SSL has exposed a high-risk vulnerability, which may cause hackers to listen to the data transmitted over the network, posing a threat to user information, network account and password, and other security threats. To ensure user information and communication security, the public platform will disable SSLv2 and SSLv3 support, and does not support some client calls using SSLv2, SSLv3, or a lower version.Developers who are still using these versions should fix the upgrade as soon as possible before January 1, November 30.


Note: developers who develop mobile applications and Web applications through the open platform (open.weixin.qq.com) also need to repair and upgrade.

We recommend that you use the following methods to fix the problem:
OpenSSL (http://www.openssl.org) can use the ssl_ctx * ssl_ctx_new (const ssl_method * method) function to set the ssl client request method, using tlsv1_client_method or a later version.

Example 1 (PHP ):
Curl_setopt ($ curl, curlopt_sslversion, curl_sslversion_tlsv1 );

Example 2 (C #):
System. net. servicepointmanager. securityprotocol = securityprotocoltype. TLS | securityprotocoltype. tls11 | securityprotocoltype. tls12 example
A https_request function is used to generate a custom menu.
function https_request($url, $data = null){    $curl = curl_init();    curl_setopt($curl, CURLOPT_URL, $url);    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);    if (!empty($data)){        curl_setopt($curl, CURLOPT_POST, 1);        curl_setopt($curl, CURLOPT_POSTFIELDS, $data);    }    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);    $output = curl_exec($curl);    curl_close($curl);    return $output;}

Now you want to add SSL version control

function https_request($url, $data = null){    $curl = curl_init();    curl_setopt($curl, CURLOPT_URL, $url);    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);    curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);    if (!empty($data)){        curl_setopt($curl, CURLOPT_POST, 1);        curl_setopt($curl, CURLOPT_POSTFIELDS, $data);    }    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);    $output = curl_exec($curl);    curl_close($curl);    return $output;}

 

The public platform adjusts the SSL security policy and the developer's Upgrade Method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.