Ortis pleaded not guilty to the charges and testified that he offered secret material to targets to get them to use an online encryption service created by an allied intelligence agency to spy on adversaries.