keyctl_invalidate (3) - Linux Manuals
keyctl_invalidate: Invalidate a key
keyctl_invalidate - Invalidate a key
#include <keyutils.h> long keyctl_invalidate(key_serial_t key);
DESCRIPTIONkeyctl_invalidate() invalidates a key. The key is scheduled for immediate removal from all the keyrings that point to it, after which it will be deleted. The key will be ignored by all searches once this function is called even if it is not yet fully dealt with.
RETURN VALUEOn success keyctl_invalidate() returns 0. On error, the value -1 will be returned and errno will have been set to an appropriate error.
- The key specified is invalid.
- The key specified has expired.
- The key specified had been revoked.
- The key exists, but is not searchable by the calling process.