Centos6.5-The SSLVersion of the CURL library in the centos6.5 system PHP environment is NSS by default. How can I change it to OpenSSL?

Source: Internet
Author: User
Now requires PHP environment support TSL1.2 and SHA-256, php CURL library upgrade to curl7.35.0, openssl upgrade to OpenSSL1.0.1f, but through the resource file view curl SSLVersion is NSS, if modified to openssl? How to change the SSLVersion to opensslc...

Now requires PHP environment support TSL1.2 and SHA-256, php CURL library upgrade to curl 7.35.0, openssl upgrade to OpenSSL/1.0.1f, but through the resource file view curl SSL Version is NSS, if it is changed to openssl?
How to change the SSL Version to openssl

Why is the SSL Version of centos 6.5 php curl NSS/3.19.1 instead of OpenSSL/1.0.1f changed?

Reply content:

Now requires PHP environment support TSL1.2 and SHA-256, php CURL library upgrade to curl 7.35.0, openssl upgrade to OpenSSL/1.0.1f, but through the resource file view curl SSL Version is NSS, if it is changed to openssl?
How to change the SSL Version to openssl

Why is the SSL Version of centos 6.5 php curl NSS/3.19.1 instead of OpenSSL/1.0.1f changed?

To address your problem, I personally practiced it in my development environment. Let's talk about the following steps:

  1. First, update openssl to the latest version.

  2. Then confirm whether the ssl version of curl is openssl. By default, NSS is installed in centos.

If openssl is not used, download the curl and recompile it.

wget https://curl.haxx.se/download/archeology/curl-7.19.7.tar.gztar xvzf curl-7.19.7.tar.gzcd curl-7.19.7./configure --prefix=/usr/local/curl/ --without-nss --with-sslsudo make && sudo make install

Back up the default curl binary file
Sudo mv/usr/bin/curl. bak
Then create a new curl soft chain
Sudo ln-s/usr/local/curl/bin/curl/usr/bin/curl

Then, run curl -- version to check whether the version is openssl.

  1. Download the PHP source code package of the corresponding version and recompile and install the php curl extension.

    Wget http://cn2.php.net/get/php-5.6.21.tar.gz
    Tar xvzf php-5.6.21.tar.gz
    Cd phpphp-5.6.21/ext/curl
    Phpize
    ./Configure -- with-curl =/usr/local/curl/-- with-php-config =/usr/local/php/bin/php-config
    Sudo make & sudo make install

Curl. so will be generated in the/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/directory after installation

Note: If the curl extension has been installed, delete curl. so first.

Restart php-fpm and then confirm phpinfo.

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.