fix return value of get_cert_chain()