]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
auth/KeyRing: always decode keying as plaintext
authorKefu Chai <kchai@redhat.com>
Tue, 1 Jun 2021 14:44:08 +0000 (22:44 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 2 Jun 2021 03:02:28 +0000 (11:02 +0800)
commit1bfd785307684f3fc2423f87608e4a84e374b64c
treec58c6724cc42ba14be213dd66c1a78c63896e7a2
parentbb92c4ff83779812edf7e5806c2097a627efee9b
auth/KeyRing: always decode keying as plaintext

for three reasons:

* we don't encode binary KeyRing since v0.48: the binary encoder for
  KeyRing was dropped in eaea7aa9b28849be612b22ce84971db671319806,
  which was included since v0.48 (argonaut). and we don't encode
  KeyRing in binary manually elsewhere since then.
* we should not use exception in the normal code path. in C++,
  exception is not designed to be efficient or semantically a
  language facility to be part of the normal code path. so, from
  the readability perspective, we should not use exception here.
  as all encoded KeyRings are in plaintext.
* simpler this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/auth/KeyRing.cc