After having some hard time installing some packages with composer, i decided to give back some simple solutions for all of you.
First of all suppose you operate in a shared hosting environment where you are not able to mess with the openssl CA root certificates and change the paths.
So you can simply download locally (e.g. /home/kmak) this http://curl.haxx.se/ca/cacert.pem
After you install locally composer.phar you can create your composer.json by requiting your package:
Then edit composer.json and add the following config section, so finally your composer.json will look like this:
Now you can proceed like this:
If you encouter further SSL certificate errors due to git attempting to clone some project, then you can do this:
Remember disabling SSL certificate verification is a major security issue and should be avoided if possible.