For my android game, I want to secure the connection between the server and its clients through TLS certificates on each side, because of the sensitive data that is beeing exchanged through a token based login system and other userdata. Webbrowsers should also access the same domain but get different data served.
Is it possible, to use two different kind of certificates on the servers domain bound to ports? Self-signed one for the server (without own CA) and a self-signed one (hardcoded in the gameclient) for gameclient connections to port 9443. One from a CA like letsencrypt.org for webbrowsers that connect to port 443?
Do I have to run 2 different http-servers for that on the same machine?
Example: A game client connecting to example.com (or the direct IP address with port 9443) gets authenticated as a valid client and therefore can register, login or update game data.
Browser who's connecting to example.com (port 443) sees a website, can access player profiles that are simple html pages.
My research so far: I already saw in the openssl example config file here, that using different subdomains as the common name for each certificate may will work? But no mention if something works bound to ports.
I appreciate your help. Thanks.