Fix various issues with the replication SSL test

Reissued certificates, fixed some issues with connection detection, and improve logging.