Encode cert path before send it.