mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
Pipe, cephx: Message signing under config option
The config option was present earlier but the option is checked not in the beginning, so, it was doing some stuff. Now the config option guard is at the very beginning of the function. Signed-off-by: Somnath Roy <somnath.roy@sandisk.com> Signed-off-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
parent
5fde828dac
commit
684e5c4576
@ -26,14 +26,13 @@
|
||||
|
||||
int CephxSessionHandler::sign_message(Message *m)
|
||||
{
|
||||
bufferlist bl_plaintext, bl_encrypted;
|
||||
ceph_msg_header header = m->get_header();
|
||||
std::string error;
|
||||
|
||||
// If runtime signing option is off, just return success without signing.
|
||||
if (!cct->_conf->cephx_sign_messages) {
|
||||
return 0;
|
||||
}
|
||||
bufferlist bl_plaintext, bl_encrypted;
|
||||
ceph_msg_header header = m->get_header();
|
||||
std::string error;
|
||||
|
||||
ceph_msg_footer& en_footer = m->get_footer();
|
||||
|
||||
@ -71,16 +70,16 @@ int CephxSessionHandler::sign_message(Message *m)
|
||||
|
||||
int CephxSessionHandler::check_message_signature(Message *m)
|
||||
{
|
||||
bufferlist bl_plaintext, bl_ciphertext;
|
||||
std::string sig_error;
|
||||
ceph_msg_header& header = m->get_header();
|
||||
ceph_msg_footer& footer = m->get_footer();
|
||||
|
||||
// If runtime signing option is off, just return success without checking signature.
|
||||
if (!cct->_conf->cephx_sign_messages) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bufferlist bl_plaintext, bl_ciphertext;
|
||||
std::string sig_error;
|
||||
ceph_msg_header& header = m->get_header();
|
||||
ceph_msg_footer& footer = m->get_footer();
|
||||
|
||||
if ((features & CEPH_FEATURE_MSG_AUTH) == 0) {
|
||||
// it's fine, we didn't negotiate this feature.
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user