REFACTOR: openssl localhost matching