| 225 | } |
| 226 | |
| 227 | void KeyRing::print(ostream& out) |
| 228 | { |
| 229 | for (auto& [ename, eauth] : keys) { |
| 230 | out << "[" << ename << "]" << std::endl; |
| 231 | out << "\tkey = " << eauth.key << std::endl; |
| 232 | if (!eauth.pending_key.empty()) { |
| 233 | out << "\tpending key = " << eauth.pending_key << std::endl; |
| 234 | } |
| 235 | |
| 236 | for (auto& [sys, capbl] : eauth.caps) { |
| 237 | auto dataiter = capbl.cbegin(); |
| 238 | string caps; |
| 239 | ceph::decode(caps, dataiter); |
| 240 | boost::replace_all(caps, "\"", "\\\""); |
| 241 | out << "\tcaps " << sys << " = \"" << caps << '"' << std::endl; |
| 242 | } |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | void KeyRing::import(CephContext *cct, KeyRing& other) |
| 247 | { |