Example of cURL using SSL Certificate verification with apache, https
- Apache2
- libssl1.0-dev
- curl & libcurl
- OpenSSL - Optional
-
Copy Sample_HTML/ to /var/www/html/
sudo cp -rvf <Path_To>/QtCurl_ssl/Sample_HTML/* /var/www/html/
-
Copy site conf to apache site-available
sudo cp -rvf <Path_To>/QtCurl_ssl/apache/System.org.conf /etc/apache2/sites-available
-
Copy sample certificates
sudo cp -rvf <Path_To>/QtCurl_ssl/ssl_certs/ /opt sudo chown <USERNAME>:<USERNAME> -R /opt/ssl_certs/
-
Enable site
sudo a2ensite System.org
-
set HostName
sudo vim /etc/hosts SYSTEM_IP System System.org
save and exit
-
Restart apache2 service
sudo systemctl restart apache2
-
Verify url open any web browser
https://System.org
sudo ln -s /opt/ssl_certs/arise1600.crt /etc/ssl/certs/TestSystem.pem
-
Cmake build
cd <Path_To>/QtCurl_ssl/ mkdir cBuild && cd cBuild/ cmake .. make
-
Qmake build
cd <Path_To>/QtCurl_ssl/ mkdir qBuild && cd qBuild/ qmake .. make
-
Run
./QtCurl_ssl