Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / auth / none / AuthNoneSessionHandler.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
2 // vim: ts=8 sw=2 smarttab
3 /*
4  * Ceph - scalable distributed file system
5  *
6  * Copyright (C) 2004-2009 Sage Weil <sage@newdream.net>
7  *
8  * This is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License version 2.1, as published by the Free Software 
11  * Foundation.  See file COPYING.
12  * 
13  */
14
15 #include "auth/AuthSessionHandler.h"
16 #include "msg/Message.h"
17
18 class CephContext;
19
20 class AuthNoneSessionHandler  : public AuthSessionHandler {
21 public:
22   AuthNoneSessionHandler(CephContext *cct_, CryptoKey session_key)
23     : AuthSessionHandler(cct_, CEPH_AUTH_NONE, session_key) {}
24   ~AuthNoneSessionHandler() override {}
25   
26   bool no_security() override {
27     return true;
28   }
29
30   // The None suite neither signs nor encrypts messages, so these functions just return success.
31   // Since nothing was signed or encrypted, don't increment the stats.  PLR
32
33   int sign_message(Message *m) override {
34     return 0;
35   }
36
37   int check_message_signature(Message *m) override {
38     return 0;
39   }
40
41   int encrypt_message(Message *m) override {
42     return 0;
43   }
44
45   int decrypt_message(Message *m) override {
46     return 0;
47   }
48
49 };
50