Inserts certificate data into response and check that result is valid