How to solve this ? Curl Error : Protocol "https" not supported or disabled in libcurl - libcurl

I was looking everywhere how to solve this problem and nothing.
I am using Centos 6 VPS. Thanks

Your libcurl is built without ssl support.
e.g. --without-ssl
libcurl FAQ

As #Icarus3 mentioned, make sure SSL feature is enabled.
$ curl --version
See curl/CMakeLists.txt.
if(WIN32 OR CURL_USE_SECTRANSP OR CURL_USE_SCHANNEL OR CURL_USE_MBEDTLS OR CURL_USE_NSS OR CURL_USE_WOLFSSL)
set(openssl_default OFF)
endif()
If you are using CMake to build curl, you can use the following command.
$ cmake -D BUILD_SHARED_LIBS=OFF \
-D CURL_USE_SCHANNEL=ON \
-D CURL_STATIC_CRT=ON ..

On Ubuntu, you may install the development package, which is libssl-dev:
sudo apt-get install libssl-dev
It works for me.

Related

Magento on PHP 7.2 wamp server

i am configuring an existing magento project on local system with WAMP server php version 7.2, while installing magento i get error "PHP extension "mcrypt" must be loaded."
Problem is mycrypt is no longer supported in php 7.2, can anyone suggest how can i resolve it?
mcrypt has been moved from php to pecl since 7.2
You still can install it.
Install dependencies
gcc make autoconf libc-dev pkg-config
install the lib itself
libmcrypt-dev
I assume php7.2 and pecl are installed so you just install mcrypt-1.0.1 (or whatever version is in rep.) with pecl
pecl install mcrypt-1.0.1

Can't call Stripe on Appengine development server even with latest ssl

I am running into the same issue on my development server. I have already checked out stackoverflow.com/questions/46799365/… and that hasn't worked for me.
python -V
Python 2.7.11
and as soon as I call stripe, I get the Support for test mode requests made with versions of TLS lower than 1.2 has been disabled, and support in live mode will be dropped on June 13, 2018. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at https://stripe.com/blog/upgrading-tls.
My app.yaml has ssl set to "latest" libraries: - name: django version: "1.9" - name: jinja2 version: "2.6" - name: markupsafe version: "0.15" - name: ssl version: latest - name: pycrypto version: latest
So am I supposed to do something with sandbox.py? I think my request is version 2.16.0 because I was getting some other environment issue when it wasn't. Is that he culprit or something else?
Here's the exact error
PermissionError at /
Request req_DrUOViv9FnjhAx: Support for test mode requests made with versions
of TLS lower than 1.2 has been disabled, and support in live mode will be dropped on June 13, 2018. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at https://stripe.com/blog/upgrading-tls.
Request Method:
GET
Request URL:
http://localhost:8080/
Django Version:
1.9.5
Exception Type:
PermissionError
Exception Value:
Request req_DrUOViv9FnjhAx: Support for test mode requests made with versions of TLS lower than 1.2 has been disabled, and support in live mode will be dropped on June 13, 2018. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at https://stripe.com/blog/upgrading-tls.
Exception Location:
lib/stripe/api_requestor.py in handle_error_response, line 178
Python Executable:
/Users/USERNAME/PycharmProjects/PROJECTNAME/virtualenv-dev/bin/python
Python Version:
2.7.11
Python Path:
['/Users/USERNAME/PycharmProjects/PROJECTNAME',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine',
'/Users/USERNAME/PycharmProjects/PROJECTNAME',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine',
'/Users/USERNAME/PycharmProjects/PROJECTNAME/virtualenv/lib/python2.7',
'/Users/USERNAME/PycharmProjects/PROJECTNAME/virtualenv/lib/python2.7/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/django-1.9',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/jinja2-2.6',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/markupsafe-0.15',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/ssl-2.7.11',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/pycrypto-2.6',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/setuptools-0.6c11',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/protorpc-1.0',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/pytz-2017.2',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/webob-1.1.1',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/werkzeug-0.11.10',
'/Users/USERNAME/Downloads/google-cloud-sdk/platform/google_appengine/lib/yaml-3.10',
'lib']
Server time:
Sat, 24 Mar 2018 00:43:28 -0500
I spent many hours on this about a month ago. It was a huge pain, but I finally got it to work.
One issue I was having is that Brew does something very annoying with its python versions. It makes python v3 the default so if you type python in the shell you get v3 and not v2. I manually changed the relevant symlinks in '/usr/local/bin' to make v2 the default.
I don't remember all the steps I took, but you'll want your '/usr/local/bin' to look something like this:
openssl -> /usr/local/Cellar/openssl/1.0.2n/bin/openssl
pip -> ../Cellar/python/2.7.14_3/bin/pip2
python -> ../Cellar/python/2.7.14_3/bin/python2
You'll then want to delete your virtualenv's and recreate them.
Note that I don't use python v3 at all, so if you need both v2 and v3 then YMMV.
In addition to using the latest GAE ssl library, when running the application on the local development server you may also need to upgrade your local system's openssl library.
From How do I upgrade my Stripe integration from TLS 1.0 to TLS 1.2? (other specific OS versions are mentioned separately):
If you are using any other system, or are already using brew on OS X, you will need to upgrade your OpenSSL version.
And from How do I upgrade my OpenSSL to support TLS 1.2? (other specific OS versions are mentioned separately):
If you are using any other Linux variant, you will need to ensure that
running openssl version gives a version of at least 1.0.1. If it
does not, you will need to take package updates, and may need to
upgrade to a newer version of your operating system.
Hope this helps someone in this situation....I had my IT admin help me and and it was a combination of things so I'm posting the solution here for my case to save someone else from the same frustration.
These instructions assume you are running these commands all as an Administrator
First remove HomeBrew:
echo -ne 'y\n' | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
sudo rm -rf /usr/local/Homebrew
sudo rm -rf /usr/local/Caskroom
sudo rm -rf /usr/local/Cellar
Remove other Pythons installed (v2)
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
sudo rm -rf "/Applications/Python 2.7"
Check for links and remove any you find with Cellar in the path
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | grep 'Cellar'
unlink <## Remove those you found ##>
Re-install Homebrew
echo -ne 'y\n' | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Add in openssl
brew install openssl
brew postinstall openssl
brew link openssl --force
Force Link openssl if needed
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
Add in Python
brew install python#2
brew postinstall python#2
brew link python#2 --force
link openssl and Python (ensure these versions are what you have installed)
ln -s /usr/local/Cellar/openssl/1.0.2o/bin/openssl /usr/local/bin/openssl
ln -s /usr/local/Cellar/openssl/1.0.2o/bin/openssl /usr/local/ssl/bin/openssl
ln -s /usr/local/Cellar/python/2.7.14/bin/python /usr/local/bin/python
Clean HomeBrew Once Installed
brew cleanup -s
brew cask cleanup
brew prune
From here the command showed the correct version
python -c 'import ssl; print ssl.OPENSSL_VERSION'

rbenv install not downloading ruby version

Installing ruby version with rbenv rbenv install -lreturns the proper list. However
$ rbenv install 2.3.4 -v
fails on the download, even though it can be downloaded via a browser. My hunch about an improper version of openssl (due to some distant memory of having such issues - tls version? - in the past) is supported in verbose mode:
ruby-build: use openssl from homebrew
/var/folders/kV/kVDOSPkcEuqSVnTjenAVRE+++TI/-Tmp-/ruby-build.20170601122915.1010 ~ Downloading ruby-2.3.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.bz2
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
error: failed to download ruby-2.3.4.tar.bz2
how to overcome? can I point rbenv to use the downloaded tarball?
The reason is because rbenv use old system curl and old system openssl with it, which knows nothing about protocols TLS v 1.1-1.3. For me, installing new version of curl and openssl with brew did the work:
brew install openssl#1.1
brew install curl
Then add installed curl to your PATH (before default path, which is /usr/bin), and ensure that openssl of actual brew's version is also there (add this to your ./bash_profile or ./zshrc or etc):
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export PATH="/usr/local/opt/curl/bin:$PATH"
You can make sure after relaunch of terminal that latest versions of this programs will be used by trying
which -a openssl
which -a curl
openssl version -a
curl -V
First two commands should output all paths with the programs, but top ones should be brew versions. Last two commands should show latest versions of programs (1.1.0f and 7.55 for me now).
Now try
rbenv install [version]
Works on MacOS Sierra with enabled SIP.

Need help to install c++ grpc on ubuntu 16.04

I tried to install grpc by executing the following
git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
make
But when I run make, I get the message "#error This file was generated by an older version of protoc which is"
But, I have the latest protoc installed ...
/usr/bin/protoc --version
libprotoc 3.2.0
Posting an answer to my own question ...
The issue gets resolved when I remove the third party protobuf files before running install.
rm -rf third_party/protobuf
I am not exactly sure why this works though ...

JSON support was not enabled-Modsecurity

1) I have compiled modsecurity using YAJL using --with-yajl but in the config log I see that the yajl library is not picked and in the modsecurity log I get
"JSON support was not enabled"
I initially had mod_security working with PHP 5.5 and Apache 2.4, with Ubuntu 12.04, but after enabling JSON request inspection I got the same error as you reported.
To fix it, I had to make yajl, re-compile mod_security with the yajl configure option, and then ensure that Apache was using the updated mod_security, and restart Apache.
mod_security was then able to successfully parse json request body and not output the error any longer.
I went to http://lloyd.github.io/yajl/ and found the download package for yajl-2.1.0, and then referred to https://gist.github.com/rpfilomeno/1140359f4bd360137a98.
For example:
tar -xvzf lloyd-yajl-2.1.0-0-ga0ecdde.tar.gz
cd lloyd-yajl-66cb08c/
sudo ./configure
sudo make
sudo make install
sudo ldconfig
That should install yajl. Then cd to the folder with the mod_security files, and run
cd ../modsecurity-2.9.1/
sudo ./configure --with-yajl="/usr/local/lib /usr/local"
sudo make
sudo make install
I then configured it to run with Apache 2.4, and have been able to parse requests with a JSON body.
*Note that when making yajl, if there is an error relating to cmake not being installed, run the following sudo apt-get install cmake, and then try making it again.
Check your config.log if it has following
checking for libyajl config script... no
checking for yajl install... no
configure: optional yajl library not found
Then create a link to yajl.pc as
# ln -s /usr/local/share/pkgconfig/yajl.pc /usr/share/pkgconfig/yajl.pc
In my case file yajl.pc was in /usr/local/share/pkgconfig/ location. If you cannot find it there try " find / -name yajl.pc " to locate it.
Hope this helps you.