Connection to database via SSL

This patch makes it possible to connect the database via SSL.