Verify certificate function