if (key->flags & (KEY_FLAG_REVOKED | KEY_FLAG_DEAD))
if (test_bit(KEY_FLAG_REVOKED, &key->flags) || test_bit(KEY_FLAG_DEAD, &key->flags))
int key_validate(struct key *key){	struct timespec now;	int ret = 0;	if (key) {		/* check it's still accessible */		ret = -EKEYREVOKED;		if (key->flags & (KEY_FLAG_REVOKED | KEY_FLAG_DEAD))			goto error;		/* check it hasn't expired */		ret = 0;		if (key->expiry) {			now = current_kernel_time();			if (now.tv_sec >= key->expiry)				ret = -EKEYEXPIRED;		}	} error:	return ret;} /* end key_validate() */