I have created a PHP script that authenticates automatically into a website that needs a client certificate, using CURL.
The certificate is always on my apache web-server, however it is accessible by typing the link of the certificate. Ex: www.testdomain.com/cert.cer (You can download it typing the link).
This kind of certificate must be private and not accessible just by typing the link. It is just needed to make the authentication, so that the PHP script can perform an action.
I am using CURL, PHP and Apache2 Server. How can I block the CER certificate, so that only the script can access it? I have already tried to edit permissions, 770 (No Anonymous users), but then is neither accessible by the script.
Please help me! Any suggestion would be appreciated.