Linux Audio

Check our new training course

Loading...
v3.5.6
 
 1#ifndef __FS_CEPH_AUTH_X_PROTOCOL
 2#define __FS_CEPH_AUTH_X_PROTOCOL
 3
 4#define CEPHX_GET_AUTH_SESSION_KEY      0x0100
 5#define CEPHX_GET_PRINCIPAL_SESSION_KEY 0x0200
 6#define CEPHX_GET_ROTATING_KEY          0x0400
 7
 8/* common bits */
 9struct ceph_x_ticket_blob {
10	__u8 struct_v;
11	__le64 secret_id;
12	__le32 blob_len;
13	char blob[];
14} __attribute__ ((packed));
15
16
17/* common request/reply headers */
18struct ceph_x_request_header {
19	__le16 op;
20} __attribute__ ((packed));
21
22struct ceph_x_reply_header {
23	__le16 op;
24	__le32 result;
25} __attribute__ ((packed));
26
27
28/* authenticate handshake */
29
30/* initial hello (no reply header) */
31struct ceph_x_server_challenge {
32	__u8 struct_v;
33	__le64 server_challenge;
34} __attribute__ ((packed));
35
36struct ceph_x_authenticate {
37	__u8 struct_v;
38	__le64 client_challenge;
39	__le64 key;
40	/* ticket blob */
 
41} __attribute__ ((packed));
42
43struct ceph_x_service_ticket_request {
44	__u8 struct_v;
45	__le32 keys;
46} __attribute__ ((packed));
47
48struct ceph_x_challenge_blob {
49	__le64 server_challenge;
50	__le64 client_challenge;
51} __attribute__ ((packed));
52
53
54
55/* authorize handshake */
56
57/*
58 * The authorizer consists of two pieces:
59 *  a - service id, ticket blob
60 *  b - encrypted with session key
61 */
62struct ceph_x_authorize_a {
63	__u8 struct_v;
64	__le64 global_id;
65	__le32 service_id;
66	struct ceph_x_ticket_blob ticket_blob;
67} __attribute__ ((packed));
68
69struct ceph_x_authorize_b {
70	__u8 struct_v;
71	__le64 nonce;
 
 
 
 
 
 
 
72} __attribute__ ((packed));
73
74struct ceph_x_authorize_reply {
75	__u8 struct_v;
76	__le64 nonce_plus_one;
77} __attribute__ ((packed));
78
79
80/*
81 * encyption bundle
82 */
83#define CEPHX_ENC_MAGIC 0xff009cad8826aa55ull
84
85struct ceph_x_encrypt_header {
86	__u8 struct_v;
87	__le64 magic;
88} __attribute__ ((packed));
89
90#endif
v6.9.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __FS_CEPH_AUTH_X_PROTOCOL
 3#define __FS_CEPH_AUTH_X_PROTOCOL
 4
 5#define CEPHX_GET_AUTH_SESSION_KEY      0x0100
 6#define CEPHX_GET_PRINCIPAL_SESSION_KEY 0x0200
 7#define CEPHX_GET_ROTATING_KEY          0x0400
 8
 9/* common bits */
10struct ceph_x_ticket_blob {
11	__u8 struct_v;
12	__le64 secret_id;
13	__le32 blob_len;
14	char blob[];
15} __attribute__ ((packed));
16
17
18/* common request/reply headers */
19struct ceph_x_request_header {
20	__le16 op;
21} __attribute__ ((packed));
22
23struct ceph_x_reply_header {
24	__le16 op;
25	__le32 result;
26} __attribute__ ((packed));
27
28
29/* authenticate handshake */
30
31/* initial hello (no reply header) */
32struct ceph_x_server_challenge {
33	__u8 struct_v;
34	__le64 server_challenge;
35} __attribute__ ((packed));
36
37struct ceph_x_authenticate {
38	__u8 struct_v;
39	__le64 client_challenge;
40	__le64 key;
41	/* old_ticket blob */
42	/* nautilus+: other_keys */
43} __attribute__ ((packed));
44
45struct ceph_x_service_ticket_request {
46	__u8 struct_v;
47	__le32 keys;
48} __attribute__ ((packed));
49
50struct ceph_x_challenge_blob {
51	__le64 server_challenge;
52	__le64 client_challenge;
53} __attribute__ ((packed));
54
55
56
57/* authorize handshake */
58
59/*
60 * The authorizer consists of two pieces:
61 *  a - service id, ticket blob
62 *  b - encrypted with session key
63 */
64struct ceph_x_authorize_a {
65	__u8 struct_v;
66	__le64 global_id;
67	__le32 service_id;
68	struct ceph_x_ticket_blob ticket_blob;
69} __attribute__ ((packed));
70
71struct ceph_x_authorize_b {
72	__u8 struct_v;
73	__le64 nonce;
74	__u8 have_challenge;
75	__le64 server_challenge_plus_one;
76} __attribute__ ((packed));
77
78struct ceph_x_authorize_challenge {
79	__u8 struct_v;
80	__le64 server_challenge;
81} __attribute__ ((packed));
82
83struct ceph_x_authorize_reply {
84	__u8 struct_v;
85	__le64 nonce_plus_one;
86} __attribute__ ((packed));
87
88
89/*
90 * encryption bundle
91 */
92#define CEPHX_ENC_MAGIC 0xff009cad8826aa55ull
93
94struct ceph_x_encrypt_header {
95	__u8 struct_v;
96	__le64 magic;
97} __attribute__ ((packed));
98
99#endif