mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
codership/mariadb-wsrep#27 Galera cache encryption
* 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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user