1KEYCTL_REVOKE(3) Linux Key Management Calls KEYCTL_REVOKE(3)
2
3
4
6 keyctl_revoke - revoke a key
7
9 #include <keyutils.h>
10
11 long keyctl_revoke(key_serial_t key);
12
14 keyctl_revoke() marks a key as being revoked.
15
16 After this operation has been performed on a key, attempts to access it
17 will meet with error EKEYREVOKED.
18
19 The caller must have write permission on a key to be able revoke it.
20
22 On success keyctl_revoke() returns 0. On error, the value -1 will be
23 returned and errno will have been set to an appropriate error.
24
26 ENOKEY The specified key does not exist.
27
28 EKEYREVOKED
29 The key has already been revoked.
30
31 EACCES The named key exists, but is not writable by the calling
32 process.
33
35 This is a library function that can be found in libkeyutils. When
36 linking, -lkeyutils should be specified to the linker.
37
39 keyctl(1), add_key(2), keyctl(2), request_key(2), keyctl(3),
40 keyrings(7), keyutils(7)
41
42
43
44Linux 4 May 2006 KEYCTL_REVOKE(3)