Add extract cert method to utilities and use that in response to get rid of duplication