Browse Source

use the same name as JSON adapter

COM-121
Volker Birk 2 years ago
parent
commit
5be679d7ab
3 changed files with 15 additions and 15 deletions
  1. +13
    -13
      CpEpEngine.cpp
  2. +1
    -1
      CpEpEngine.h
  3. +1
    -1
      pEpCOMServerAdapter.cpp

+ 13
- 13
CpEpEngine.cpp View File

@ -429,7 +429,7 @@ STDMETHODIMP CpEpEngine::GetMessageTrustwords(
char* _words = NULL;
if (result == S_OK) {
auto status = cache.api(::get_message_trustwords,
auto status = passphrase_cache.api(::get_message_trustwords,
session(),
_msg,
_keylist,
@ -857,7 +857,7 @@ STDMETHODIMP CpEpEngine::KeyResetIdentity(struct pEpIdentity ident, BSTR fpr)
string _fpr = utf8_string(fpr);
PEP_STATUS status = cache.api(::key_reset_identity, session(), _ident, _fpr.c_str());
PEP_STATUS status = passphrase_cache.api(::key_reset_identity, session(), _ident, _fpr.c_str());
free_identity(_ident);
@ -878,7 +878,7 @@ STDMETHODIMP CpEpEngine::KeyResetUser(BSTR userId, BSTR fpr)
string _userId = utf8_string(userId);
string _fpr = utf8_string(fpr);
PEP_STATUS status = cache.api(::key_reset_user, session(), _userId.c_str(), _fpr.c_str());
PEP_STATUS status = passphrase_cache.api(::key_reset_user, session(), _userId.c_str(), _fpr.c_str());
if (status == PEP_OUT_OF_MEMORY)
return E_OUTOFMEMORY;
@ -894,7 +894,7 @@ STDMETHODIMP CpEpEngine::KeyResetUser(BSTR userId, BSTR fpr)
STDMETHODIMP CpEpEngine::KeyResetAllOwnKeys()
{
PEP_STATUS status = cache.api(::key_reset_all_own_keys, session());
PEP_STATUS status = passphrase_cache.api(::key_reset_all_own_keys, session());
if (status == PEP_OUT_OF_MEMORY)
return E_OUTOFMEMORY;
@ -924,7 +924,7 @@ STDMETHODIMP CpEpEngine::KeyResetTrust(struct pEpIdentity *ident)
return FAIL(ex.what());;
}
PEP_STATUS status = cache.api(::key_reset_trust, session(), _ident);
PEP_STATUS status = passphrase_cache.api(::key_reset_trust, session(), _ident);
free_identity(_ident);
if (status == PEP_OUT_OF_MEMORY)
@ -1008,7 +1008,7 @@ PEP_STATUS CpEpEngine::messageToSend(message *msg)
bool in_sync = on_sync_thread();
if (in_sync && !msg)
return pEp::PassphraseCache::messageToSend(cache, session());
return pEp::PassphraseCache::messageToSend(passphrase_cache, session());
for (auto p = sync_callbacks.begin(); p != sync_callbacks.end(); ++p) {
IpEpEngineCallbacks *cb = in_sync ? _unmarshaled_consumer(p) : p->pdata->unmarshaled;
@ -1207,7 +1207,7 @@ STDMETHODIMP CpEpEngine::EncryptMessage(TextMessage * src, TextMessage * dst, SA
// Since COM-74, this has been changed to an explicit parameter, to allow the engine to attach
// the keys and headers to outgoing, unencrypted messages.
PEP_encrypt_flags_t engineFlags = (PEP_encrypt_flags_t)flags;
PEP_STATUS status = cache.api(::encrypt_message, session(), _src, _extra, &msg_dst, _encFormat, engineFlags);
PEP_STATUS status = passphrase_cache.api(::encrypt_message, session(), _src, _extra, &msg_dst, _encFormat, engineFlags);
::free_stringlist(_extra);
if (status == PEP_STATUS_OK)
@ -1268,7 +1268,7 @@ STDMETHODIMP CpEpEngine::EncryptMessageAndAddPrivKey(TextMessage * src, TextMess
// Since COM-74, this has been changed to an explicit parameter, to allow the engine to attach
// the keys and headers to outgoing, unencrypted messages.
PEP_encrypt_flags_t engineFlags = (PEP_encrypt_flags_t)flags;
PEP_STATUS status = cache.api(::encrypt_message_and_add_priv_key, session(), _src, &msg_dst, _to_fpr.c_str(), _encFormat, engineFlags);
PEP_STATUS status = passphrase_cache.api(::encrypt_message_and_add_priv_key, session(), _src, &msg_dst, _to_fpr.c_str(), _encFormat, engineFlags);
if (status == PEP_STATUS_OK)
text_message_from_C(dst, msg_dst);
@ -1334,7 +1334,7 @@ STDMETHODIMP CpEpEngine::EncryptMessageForSelf(pEpIdentity * targetId, TextMessa
// COM-19: Initialize msg_dst to NULL, or we end up calling
// free_message() below with a pointer to random garbage in
// case of an error in encrypt_message_for_self().
status = cache.api(::encrypt_message_for_self, session(), _target_id, _src, _extra, &msg_dst, PEP_enc_PEP, engineFlags);
status = passphrase_cache.api(::encrypt_message_for_self, session(), _target_id, _src, _extra, &msg_dst, PEP_enc_PEP, engineFlags);
if (status == PEP_STATUS_OK)
text_message_from_C(dst, msg_dst);
@ -1392,7 +1392,7 @@ STDMETHODIMP CpEpEngine::DecryptMessage(TextMessage * src, TextMessage * dst, SA
::PEP_rating _rating;
PEP_decrypt_flags_t engineflags = (PEP_decrypt_flags_t)*flags;
PEP_STATUS status = cache.api(::decrypt_message, session(), _src, &msg_dst, &_keylist, &_rating, &engineflags);
PEP_STATUS status = passphrase_cache.api(::decrypt_message, session(), _src, &msg_dst, &_keylist, &_rating, &engineflags);
*flags = (pEpDecryptFlags)engineflags;
@ -1973,7 +1973,7 @@ STDMETHODIMP CpEpEngine::DisableIdentityForSync(struct pEpIdentity * ident)
if (_ident == NULL)
return E_OUTOFMEMORY;
PEP_STATUS status = cache.api(::disable_identity_for_sync, session(), _ident);
PEP_STATUS status = passphrase_cache.api(::disable_identity_for_sync, session(), _ident);
::free_identity(_ident);
@ -2082,7 +2082,7 @@ STDMETHODIMP CpEpEngine::ConfigPassphrase(BSTR passphrase)
if (passphrase)
_passphrase = utf8_string(passphrase);
PEP_STATUS status = ::config_passphrase(session(), cache.add(_passphrase));
PEP_STATUS status = ::config_passphrase(session(), passphrase_cache.add(_passphrase));
if (status == PEP_STATUS_OK)
return S_OK;
@ -2100,7 +2100,7 @@ STDMETHODIMP CpEpEngine::ConfigPassphraseForNewKeys(VARIANT_BOOL enable, BSTR pa
_passphrase = utf8_string(passphrase);
passphrase_for_new_keys = _passphrase;
PEP_STATUS status = ::config_passphrase_for_new_keys(session(), enable, cache.add_stored(_passphrase));
PEP_STATUS status = ::config_passphrase_for_new_keys(session(), enable, passphrase_cache.add_stored(_passphrase));
if (status == PEP_STATUS_OK)
return S_OK;


+ 1
- 1
CpEpEngine.h View File

@ -14,7 +14,7 @@ using namespace utility;
using namespace pEp::utility;
using namespace pEp::Adapter;
extern pEp::PassphraseCache cache;
extern pEp::PassphraseCache passphrase_cache;
// CpEpEngine


+ 1
- 1
pEpCOMServerAdapter.cpp View File

@ -29,7 +29,7 @@ void CpEpCOMServerAdapterModule::gatekeeper(CpEpCOMServerAdapterModule * self)
CpEpCOMServerAdapterModule _AtlModule;
LocalJSONAdapter* ljs = nullptr;
pEp::PassphraseCache cache;
pEp::PassphraseCache passphrase_cache;
CMainWindow mainWindow;
extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,


Loading…
Cancel
Save