ssl with postgresql 12
Simple. Change the parameter ssl_cert_file to point to your server certificate and ssl_key_file to the private key that belongs to it.

If the private key requires a pass-phrase, you also have to set ssl_passphrase_command appropriately.

To validate client certificates, put the certification authority certificate in ssl_ca_file.