I am trying to build a server for Gemini in Java which uses client authentication using self-signed certificates similar to the CertFP authentication used in IRC or the self-signed identities in Mumble.
I can authenticate a user without problem when the cert is a SMIME certificate that is signed by a supported CA company or when using a web site certificate like www.domain.com when using Letsencrypt since both can be validated via the castore. To do pseudonymous authentication it is necessary to accept any self-signed client certificate to get the cert hash and that works in other programming languages like Python or Go, however I am not finding an option to configure that with Java. I assume I will have to write a custom authentication checker but I have no idea how.