The agreement was negotiated to comply with a 2024 law requiring the company to do a deal to address U.S. national-security concerns.