Added certificate validation when receiving.
Added certificate validation, but currently disabled in code since it has not been tested.