MCPcopy Create free account
hub / github.com/ceph/ceph / get_auth_session_handler

Function get_auth_session_handler

src/auth/AuthSessionHandler.cc:28–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28AuthSessionHandler *get_auth_session_handler(
29 CephContext *cct, int protocol,
30 const CryptoKey& key,
31 uint64_t features)
32{
33
34 // Should add code to only print the SHA1 hash of the key, unless in secure debugging mode
35#ifndef WITH_CRIMSON
36 ldout(cct,10) << "In get_auth_session_handler for protocol " << protocol << dendl;
37#endif
38 switch (protocol) {
39 case CEPH_AUTH_CEPHX:
40 // if there is no session key, there is no session handler.
41 if (key.get_type() == CEPH_CRYPTO_NONE) {
42 return nullptr;
43 }
44 return new CephxSessionHandler(cct, key, features);
45 case CEPH_AUTH_NONE:
46 return new AuthNoneSessionHandler();
47#ifdef HAVE_GSSAPI
48 case CEPH_AUTH_GSS:
49 return new KrbSessionHandler();
50#endif
51 default:
52 return nullptr;
53 }
54}
55

Callers 2

client_readyMethod · 0.85
openMethod · 0.85

Calls 1

get_typeMethod · 0.45

Tested by

no test coverage detected