virtual ~AuthAuthorizerChallenge() {}
};
+struct AuthConnectionMeta {
+ uint32_t auth_method = CEPH_AUTH_UNKNOWN;
+ CryptoKey session_key;
+ CryptoKey connection_secret;
+ std::unique_ptr<AuthAuthorizer> authorizer;
+ std::unique_ptr<AuthAuthorizerChallenge> authorizer_challenge;
+};
/*
* Key management
return msgr;
}
+ virtual AuthConnectionMeta *get_auth_meta() {
+ return nullptr;
+ }
+
/**
* Queue the given Message to send out on the given Connection.
* Success in this function does not guarantee Message delivery, only
return protocol->is_connected();
}
+AuthConnectionMeta *AsyncConnection::get_auth_meta()
+{
+ return &protocol->auth_meta;
+}
+
void AsyncConnection::connect(const entity_addrvec_t &addrs, int type,
entity_addr_t &target) {
policy.lossy = true;
}
- entity_addr_t get_peer_socket_addr() const override {
- return target_addr;
- }
+ entity_addr_t get_peer_socket_addr() const override {
+ return target_addr;
+ }
+
+ AuthConnectionMeta *get_auth_meta() override;
private:
enum {
AsyncConnection *connection;
AsyncMessenger *messenger;
CephContext *cct;
+public:
+ AuthConnectionMeta auth_meta;
public:
Protocol(int type, AsyncConnection *connection);
virtual void read_event() = 0;
virtual void write_event() = 0;
virtual bool is_queued() = 0;
+
+ virtual AuthConnectionMeta *get_auth_meta() {
+ return nullptr;
+ }
};
#endif /* _MSG_ASYNC_PROTOCOL_ */