Okay, actually I thought it could be done by editing the roundcube.conf in the apache settings (vconf), but when i replace the certificate link Apache couldn't start.
Regarding to the imap and pop3 certificate, i replaced the imap-ssl.pem and pop3-ssl.pem in the /etc/courier-imap/ folder and...