Here's the way I did it:
1. Create an ssl certificate using open ssl on your server
2. Update apache on the server to use the certificate
3. Convert the certificate to the name "cacert.pem"
4. Copy the cacert.pem from your webserver folder to your ocsinventory base directory (var/bin/lib/ocsagent...)