President Donald Trump has signed a bill extending a controversial surveillance program until April 30.