|
|
|
@ -321,16 +321,19 @@ DYNAMIC_API PEP_STATUS myself(PEP_SESSION session, pEp_identity * identity)
|
|
|
|
|
for (_keylist = keylist; _keylist && _keylist->value; _keylist = _keylist->next) {
|
|
|
|
|
bool is_own = false;
|
|
|
|
|
|
|
|
|
|
status = own_key_is_listed(session, _keylist->value, &is_own);
|
|
|
|
|
assert(status == PEP_STATUS_OK);
|
|
|
|
|
if (status != PEP_STATUS_OK) {
|
|
|
|
|
free_stringlist(keylist);
|
|
|
|
|
return status;
|
|
|
|
|
if (_session->use_only_own_private_keys)
|
|
|
|
|
{
|
|
|
|
|
status = own_key_is_listed(session, _keylist->value, &is_own);
|
|
|
|
|
assert(status == PEP_STATUS_OK);
|
|
|
|
|
if (status != PEP_STATUS_OK) {
|
|
|
|
|
free_stringlist(keylist);
|
|
|
|
|
return status;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO : also accept synchronized device group keys ?
|
|
|
|
|
|
|
|
|
|
if (is_own)
|
|
|
|
|
if (!_session->use_only_own_private_keys || is_own)
|
|
|
|
|
{
|
|
|
|
|
PEP_comm_type _comm_type_key;
|
|
|
|
|
|
|
|
|
|