1KEYCTL_INVALIDATE(3) Linux Key Management Calls KEYCTL_INVALIDATE(3)
2
3
4
6 keyctl_invalidate - Invalidate a key
7
9 #include <keyutils.h>
10
11 long keyctl_invalidate(key_serial_t key);
12
14 keyctl_invalidate() invalidates a key. The key is scheduled for imme‐
15 diate removal from all the keyrings that point to it, after which it
16 will be deleted. The key will be ignored by all searches once this
17 function is called even if it is not yet fully dealt with.
18
19 The caller must have search permission on a key to be able to invali‐
20 date it.
21
23 On success keyctl_invalidate() returns 0. On error, the value -1 will
24 be returned and errno will have been set to an appropriate error.
25
27 ENOKEY The key specified is invalid.
28
29 EKEYEXPIRED
30 The key specified has expired.
31
32 EKEYREVOKED
33 The key specified had been revoked.
34
35 EACCES The key exists, but is not searchable by the calling process.
36
38 This is a library function that can be found in libkeyutils. When
39 linking, -lkeyutils should be specified to the linker.
40
42 keyctl(1),
43 add_key(2),
44 keyctl(2),
45 request_key(2),
46 keyctl(3),
47 request-key(8)
48
49
50
51Linux 29 Aug 2013 KEYCTL_INVALIDATE(3)