added some error handling for cheking a certificate and id payload.
added some error handling for cheking a certificate and id payload.

MarginC/kame,MarginC/kame,MarginC/kame,MarginC/kame,MarginC/kame,MarginC/kame,MarginC/kame