1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-31 18:24:25 +03:00
* Implemented encryption callback and enc_set_key
* Added pure virtual functions for encryption functionality
* Set enc key if provider was not loaded on time
This commit is contained in:
mkaruza
2018-11-10 11:07:52 +01:00
parent ae734a33f8
commit 7e9419e811
11 changed files with 128 additions and 10 deletions

View File

@ -626,6 +626,18 @@ wsrep::server_state::wait_for_gtid(const wsrep::gtid& gtid, int timeout)
return provider().wait_for_gtid(gtid, timeout);
}
int
wsrep::server_state::set_encryption_key(std::vector<unsigned char>& key)
{
encryption_key_ = key;
if (state_ != s_disconnected)
{
return provider_->enc_set_key(wsrep::const_buffer(encryption_key_.data(),
encryption_key_.size()));
}
return 0;
}
std::pair<wsrep::gtid, enum wsrep::provider::status>
wsrep::server_state::causal_read(int timeout) const
{