Add a keyctl function that requests a set of capability bits to find out what features are supported.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -68,6 +68,7 @@ · 67 unmodified lines | ||
| 68 | 68 | #define KEYCTL_PKEY_VERIFY 28 /* Verify a public key signature */ |
| 69 | 69 | #define KEYCTL_RESTRICT_KEYRING 29 /* Restrict keys allowed to link to a keyring */ |
| 70 | 70 | #define KEYCTL_MOVE 30 /* Move keys between keyrings */ |
| 71 | +#define KEYCTL_CAPABILITIES 31 /* Find capabilities of keyrings subsystem */ | |
| 71 | 72 | |
| 72 | 73 | /* keyctl structures */ |
| 73 | 74 | struct keyctl_dh_params { |
| @@ -115,4 +116,17 @@ struct keyctl_pkey_params { · 41 unmodified lines | ||
| 115 | 116 | |
| 116 | 117 | #define KEYCTL_MOVE_EXCL 0x00000001 /* Do not displace from the to-keyring */ |
| 117 | 118 | |
| 119 | +/* | |
| 120 | + * Capabilities flags. The capabilities list is an array of 8-bit integers; | |
| 121 | + * each integer can carry up to 8 flags. | |
| 122 | + */ | |
| 123 | +#define KEYCTL_CAPS0_CAPABILITIES 0x01 /* KEYCTL_CAPABILITIES supported */ | |
| 124 | +#define KEYCTL_CAPS0_PERSISTENT_KEYRINGS 0x02 /* Persistent keyrings enabled */ | |
| 125 | +#define KEYCTL_CAPS0_DIFFIE_HELLMAN 0x04 /* Diffie-Hellman computation enabled */ | |
| 126 | +#define KEYCTL_CAPS0_PUBLIC_KEY 0x08 /* Public key ops enabled */ | |
| 127 | +#define KEYCTL_CAPS0_BIG_KEY 0x10 /* big_key-type enabled */ | |
| 128 | +#define KEYCTL_CAPS0_INVALIDATE 0x20 /* KEYCTL_INVALIDATE supported */ | |
| 129 | +#define KEYCTL_CAPS0_RESTRICT_KEYRING 0x40 /* KEYCTL_RESTRICT_KEYRING supported */ | |
| 130 | +#define KEYCTL_CAPS0_MOVE 0x80 /* KEYCTL_MOVE supported */ | |
| 131 | + | |
| 118 | 132 | #endif /* _LINUX_KEYCTL_H */ |