def _init_server_authentication(self, ssl_verify: OpenSslVerifyEnum, ssl_verify_locations: Optional[str]) -> None:
        """Setup the certificate validation logic for authenticating the server.
        """
        self._ssl_ctx.set_verify(ssl_verify.value)
        if ssl_verify_locations:
            # Ensure the file exists
            with open(ssl_verify_locations):
                pass
            self._ssl_ctx.load_verify_locations(ssl_verify_locations)
def _init_server_authentication ( self , ssl_verify : OpenSslVerifyEnum , ssl_verify_locations : Optional [ str ] ) -> None : self . _ssl_ctx . set_verify ( ssl_verify . value ) if ssl_verify_locations : with open ( ssl_verify_locations ) : pass self . _ssl_ctx . load_verify_locations ( ssl_verify_locations )
Setup the certificate validation logic for authenticating the server.