Implement certificate checking.