i checked all the code paths calling into KeyRing::decode(), none of
them relies on the behavior that the bl is not mutated after the
iterator is decoded.
actually, it is more intuitive to always move the iterator forward when
decoding the encoded keyring in the bufferlist.
Signed-off-by: Kefu Chai <kchai@redhat.com>
void KeyRing::decode(bufferlist::const_iterator& bl)
{
- auto start_pos = bl;
- decode_plaintext(start_pos);
+ decode_plaintext(bl);
}
int KeyRing::load(CephContext *cct, const std::string &filename)