From 2a1270f91cf898a4ef578f6e0a2312e90266264b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 29 Oct 2009 15:32:52 -0700 Subject: [PATCH] auth: AuthBlob -> CephXTicketBlob --- src/auth/Auth.h | 16 ---------------- src/auth/cephx/CephxProtocol.h | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/auth/Auth.h b/src/auth/Auth.h index 3f3434f960db7..995fa6ca89530 100644 --- a/src/auth/Auth.h +++ b/src/auth/Auth.h @@ -181,22 +181,6 @@ struct AuthTicket { }; WRITE_CLASS_ENCODER(AuthTicket) -struct AuthBlob { - uint64_t secret_id; - bufferlist blob; - - void encode(bufferlist& bl) const { - ::encode(secret_id, bl); - ::encode(blob, bl); - } - - void decode(bufferlist::iterator& bl) { - ::decode(secret_id, bl); - ::decode(blob, bl); - } -}; -WRITE_CLASS_ENCODER(AuthBlob); - /* * abstract authorizer class diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h index c2ecbba8202af..ae1ed1e0a50c5 100644 --- a/src/auth/cephx/CephxProtocol.h +++ b/src/auth/cephx/CephxProtocol.h @@ -227,13 +227,31 @@ struct CephXAuthorizer : public AuthAuthorizer { bool verify_reply(bufferlist::iterator& reply); }; + +struct CephXTicketBlob { + uint64_t secret_id; + bufferlist blob; + + void encode(bufferlist& bl) const { + ::encode(secret_id, bl); + ::encode(blob, bl); + } + + void decode(bufferlist::iterator& bl) { + ::decode(secret_id, bl); + ::decode(blob, bl); + } +}; +WRITE_CLASS_ENCODER(CephXTicketBlob); + + /* * TicketHandler */ struct CephXTicketHandler { uint32_t service_id; CryptoKey session_key; - AuthBlob ticket; // opaque to us + CephXTicketBlob ticket; // opaque to us utime_t renew_after, expires; bool have_key_flag; -- 2.39.5