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

Method sign_message

src/auth/cephx/CephxSessionHandler.cc:136–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136int CephxSessionHandler::sign_message(Message *m)
137{
138 // If runtime signing option is off, just return success without signing.
139 if (!conf(cct)->cephx_sign_messages) {
140 return 0;
141 }
142
143 uint64_t sig;
144 int r = _calc_signature(m, &sig);
145 if (r < 0)
146 return r;
147
148 ceph_msg_footer& f = m->get_footer();
149 f.sig = sig;
150 f.flags = (unsigned)f.flags | CEPH_MSG_FOOTER_SIGNED;
151 ldout(cct, 20) << "Putting signature in client message(seq # " << m->get_seq()
152 << "): sig = " << sig << dendl;
153 return 0;
154}
155
156int CephxSessionHandler::check_message_signature(Message *m)
157{

Callers 1

write_messageMethod · 0.45

Calls 2

get_footerMethod · 0.80
get_seqMethod · 0.45

Tested by

no test coverage detected