I got this error
[08006] SSL error: Tag mismatch! javax.crypto.AEADBadTagException: Tag mismatch!.
after PostgreSQL has been upgraded to version 12.
I also upgraded JDBC driver to latest version, but it didn't help.
I googled it but I found only some unrelated Java code.
I found the solution. There is an option "sslmode" in connection properties/advanced tab. It must be set to "allow". Then everything will work.