This module authenticates server-to-server connections by looking for an already established connection that uses the exact same certificate, reusing the earlier validation results and letting Prosody skip performing slower validation methods such as POSH twice.
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_s2s_auth_samecert
For earlier versions see the documentation for installing 3rd party modules