How to make Mojo::Pg or DBD::Pg verify postgresql server's SSL certs

This is undocumented in the sslmode section of DBD::Pg . Turns out you can use all the possible values of libpq's sslmode option, in DBD::Pg. So use this DSN: dbi:Pg:dbname=$dbname;host=$host;sslmode=verify-full;sslrootcert=system;user=$dbuser;password=$dbpass ...in: my $pg = Mojo::Pg->new->dsn($dsn); ...or: my $dbh = DBI->connect($dsn);