auth_x.h 847 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _FS_CEPH_AUTH_X_H
  2. #define _FS_CEPH_AUTH_X_H
  3. #include <linux/rbtree.h>
  4. #include <linux/ceph/auth.h>
  5. #include "crypto.h"
  6. #include "auth_x_protocol.h"
  7. /*
  8. * Handle ticket for a single service.
  9. */
  10. struct ceph_x_ticket_handler {
  11. struct rb_node node;
  12. unsigned service;
  13. struct ceph_crypto_key session_key;
  14. struct ceph_timespec validity;
  15. u64 secret_id;
  16. struct ceph_buffer *ticket_blob;
  17. unsigned long renew_after, expires;
  18. };
  19. struct ceph_x_authorizer {
  20. struct ceph_buffer *buf;
  21. unsigned service;
  22. u64 nonce;
  23. char reply_buf[128]; /* big enough for encrypted blob */
  24. };
  25. struct ceph_x_info {
  26. struct ceph_crypto_key secret;
  27. bool starting;
  28. u64 server_challenge;
  29. unsigned have_keys;
  30. struct rb_root ticket_handlers;
  31. struct ceph_x_authorizer auth_authorizer;
  32. };
  33. extern int ceph_x_init(struct ceph_auth_client *ac);
  34. #endif