| 228 | } |
| 229 | |
| 230 | void AES128GCM_OnWireRxHandler::authenticated_decrypt_update( |
| 231 | ceph::bufferlist& bl) |
| 232 | { |
| 233 | // discard cached crcs as we will be writing through c_str() |
| 234 | bl.invalidate_crc(); |
| 235 | for (auto& buf : bl.buffers()) { |
| 236 | auto p = reinterpret_cast<unsigned char*>(const_cast<char*>(buf.c_str())); |
| 237 | int update_len = 0; |
| 238 | |
| 239 | if (1 != EVP_DecryptUpdate(ectx.get(), p, &update_len, p, buf.length())) { |
| 240 | throw std::runtime_error("EVP_DecryptUpdate failed"); |
| 241 | } |
| 242 | ceph_assert_always(update_len >= 0); |
| 243 | ceph_assert(static_cast<unsigned>(update_len) == buf.length()); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | void AES128GCM_OnWireRxHandler::authenticated_decrypt_update_final( |
| 248 | ceph::bufferlist& bl) |
no test coverage detected