In any Ubuntu machine, for dev purposes, you can use the already provided certificates
/etc/ssl/certs/ssl-cert-snakeoil.pem
/etc/ssl/private/ssl-cert-snakeoil.key
(if by some reason the certificates are not available, install ssl-cert
from apt-get.)