Using SSL without Certificate Validation - Oracle SQL Developer
Ok, I got the answer, updating here in case if anyone facing the same issue. I just changed the hostname to have these parameter and added '&' at the end.
Something like this,
yourhostname:portname/databasename?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&