Implemented debug logging of used certificate.