Parse Certificate messages

This is branched off of #29.