Connecting to Heroku Postgre from a remote host

It was kind of tricky to figure out, but it turned out that Heroku Postgre requires some SSL tricks to connect from outside. Here are my PHPStorm connection settings, Advanced tab:

2015-12-21_11-46-58