Fix the bug in ndn-certgen: encode certificate content