Ring Daemon 16.0.0
|
Crypto material contained in the archive, not persisted in the account configuration. More...
#include <accountarchive.h>
Public Member Functions | |
AccountArchive ()=default | |
AccountArchive (const std::filesystem::path &path, std::string_view scheme={}, const std::string &pwd={}) | |
AccountArchive (const std::vector< uint8_t > &data, const std::vector< uint8_t > &password_salt={}) | |
AccountArchive (std::string_view data, const std::vector< uint8_t > &password_salt={}) | |
void | deserialize (std::string_view data, const std::vector< uint8_t > &salt) |
Deserialize archive from memory. | |
void | load (const std::filesystem::path &path, std::string_view scheme, const std::string &pwd) |
Load archive from file, optionally encrypted with provided password. | |
bool | save (const std::filesystem::path &path, std::string_view scheme, const std::string &password) const |
Save archive to file, optionally encrypted with provided password. | |
std::string | serialize () const |
Serialize structured archive data to memory. | |
Public Attributes | |
std::shared_ptr< dht::crypto::PrivateKey > | ca_key |
Generated CA key (for self-signed certificates) | |
std::map< std::string, std::string > | config |
Account configuration. | |
std::map< dht::InfoHash, Contact > | contacts |
Contacts. | |
std::map< std::string, ConvInfo > | conversations |
std::map< std::string, ConversationRequest > | conversationsRequests |
std::vector< uint8_t > | eth_key |
Ethereum private key. | |
dht::crypto::Identity | id |
Account main private key and certificate chain. | |
std::vector< uint8_t > | password_salt |
Salt for the archive encryption password. | |
std::shared_ptr< dht::crypto::RevocationList > | revoked |
Revoked devices. | |
Crypto material contained in the archive, not persisted in the account configuration.
Definition at line 35 of file accountarchive.h.
|
default |
|
inline |
Definition at line 63 of file accountarchive.h.
|
inline |
Definition at line 67 of file accountarchive.h.
|
inline |
Definition at line 71 of file accountarchive.h.
void jami::AccountArchive::deserialize | ( | std::string_view | data, |
const std::vector< uint8_t > & | salt | ||
) |
Deserialize archive from memory.
Definition at line 29 of file accountarchive.cpp.
References libjami::Account::ConfProperties::AUTOANSWER, ca_key, libjami::Account::ConfProperties::TLS::CA_LIST_FILE, libjami::Account::ConfProperties::TLS::CERTIFICATE_FILE, config, contacts, conversations, jami::Conf::CONVERSATIONS_KEY, jami::Conf::CONVERSATIONS_REQUESTS_KEY, conversationsRequests, jami::base64::decode(), libjami::Account::ConfProperties::DHT_PROXY_LIST_URL, jami::emitSignal(), eth_key, jami::Conf::ETH_KEY, JAMI_DEBUG, JAMI_ERR, password_salt, libjami::Account::ConfProperties::TLS::PRIVATE_KEY_FILE, libjami::Account::ConfProperties::PROXY_ENABLED, libjami::Account::ConfProperties::PROXY_PUSH_TOKEN, libjami::Account::ConfProperties::PROXY_SERVER, revoked, jami::Conf::RING_ACCOUNT_CERT, jami::Conf::RING_ACCOUNT_CONTACTS, jami::Conf::RING_ACCOUNT_CRL, jami::Conf::RING_ACCOUNT_KEY, and jami::Conf::RING_CA_KEY.
Referenced by load().
|
inline |
Load archive from file, optionally encrypted with provided password.
Definition at line 85 of file accountarchive.h.
References deserialize(), jami::emitSignal(), and jami::fileutils::readArchive().
|
inline |
Save archive to file, optionally encrypted with provided password.
Definition at line 92 of file accountarchive.h.
References password_salt, serialize(), and jami::fileutils::writeArchive().
Referenced by jami::ArchiveAccountManager::changePassword(), and jami::ArchiveAccountManager::exportArchive().
std::string jami::AccountArchive::serialize | ( | ) | const |
Serialize structured archive data to memory.
Definition at line 113 of file accountarchive.cpp.
Referenced by save().
std::shared_ptr<dht::crypto::PrivateKey> jami::AccountArchive::ca_key |
Generated CA key (for self-signed certificates)
Definition at line 41 of file accountarchive.h.
Referenced by deserialize().
std::map<std::string, std::string> jami::AccountArchive::config |
std::map<dht::InfoHash, Contact> jami::AccountArchive::contacts |
std::map<std::string, ConvInfo> jami::AccountArchive::conversations |
Definition at line 53 of file accountarchive.h.
Referenced by deserialize().
std::map<std::string, ConversationRequest> jami::AccountArchive::conversationsRequests |
Definition at line 54 of file accountarchive.h.
Referenced by deserialize().
std::vector<uint8_t> jami::AccountArchive::eth_key |
dht::crypto::Identity jami::AccountArchive::id |
Account main private key and certificate chain.
Definition at line 38 of file accountarchive.h.
Referenced by jami::ArchiveAccountManager::revokeDevice().
std::vector<uint8_t> jami::AccountArchive::password_salt |
Salt for the archive encryption password.
Definition at line 60 of file accountarchive.h.
Referenced by deserialize(), and save().
std::shared_ptr<dht::crypto::RevocationList> jami::AccountArchive::revoked |
Revoked devices.
Definition at line 44 of file accountarchive.h.
Referenced by deserialize(), and jami::ArchiveAccountManager::revokeDevice().