Browse Source

remove keyserver lookup

Remove keyserver functionality in keymanagement.c and in the API, including
now useless callbacks.
ENGINE-955
Luca Saiu 1 month ago
parent
commit
7e039df16a
3 changed files with 0 additions and 155 deletions
  1. +0
    -67
      src/keymanagement.c
  2. +0
    -86
      src/keymanagement.h
  3. +0
    -2
      src/pEp_internal.h

+ 0
- 67
src/keymanagement.c View File

@ -875,13 +875,6 @@ DYNAMIC_API PEP_STATUS update_identity(
if (identity->comm_type == PEP_ct_unknown)
identity->comm_type = PEP_ct_key_not_found;
}
// VB says, and I quote, "that is not implemented and no one is using it right now"
// about this bit. So, um, you're forewarned.
if (identity->comm_type != PEP_ct_compromised &&
identity->comm_type < PEP_ct_strong_but_unconfirmed)
if (session->examine_identity)
session->examine_identity(identity, session->examine_management);
goto pEp_free;
@ -1256,66 +1249,6 @@ DYNAMIC_API PEP_STATUS myself(PEP_SESSION session, pEp_identity * identity)
return _myself(session, identity, true, true, false, false);
}
DYNAMIC_API PEP_STATUS register_examine_function(
PEP_SESSION session,
examine_identity_t examine_identity,
void *management
)
{
assert(session);
if (!session)
return PEP_ILLEGAL_VALUE;
session->examine_management = management;
session->examine_identity = examine_identity;
return PEP_STATUS_OK;
}
DYNAMIC_API PEP_STATUS do_keymanagement(
retrieve_next_identity_t retrieve_next_identity,
void *management
)
{
PEP_SESSION session;
pEp_identity *identity;
// FIXME_NOW: ensure_decrypt callback???
PEP_STATUS status = init(&session, NULL, NULL, NULL);
assert(!status);
if (status)
return status;
assert(session && retrieve_next_identity);
if (!(session && retrieve_next_identity))
return PEP_ILLEGAL_VALUE;
log_event(session, "keymanagement thread started", "pEp engine", NULL, NULL);
while ((identity = retrieve_next_identity(management)))
{
assert(identity->address);
if(identity->address)
{
DEBUG_LOG("do_keymanagement", "retrieve_next_identity", identity->address);
if (identity->me) {
status = myself(session, identity);
} else {
status = recv_key(session, identity->address);
}
assert(status != PEP_OUT_OF_MEMORY);
if(status == PEP_OUT_OF_MEMORY)
return PEP_OUT_OF_MEMORY;
}
free_identity(identity);
}
log_event(session, "keymanagement thread shutdown", "pEp engine", NULL, NULL);
release(session);
return PEP_STATUS_OK;
}
DYNAMIC_API PEP_STATUS key_mistrusted(
PEP_SESSION session,
pEp_identity *ident


+ 0
- 86
src/keymanagement.h View File

@ -122,92 +122,6 @@ DYNAMIC_API PEP_STATUS update_identity(
DYNAMIC_API PEP_STATUS myself(PEP_SESSION session, pEp_identity * identity);
/**
* <!-- retrieve_next_identity() -->
*
* @brief Callback being called by do_keymanagement()
*
* @param[in] management data structure to deliver (implementation defined)
*
* @retval identity to check or NULL to terminate do_keymanagement()
* if given identity must be created with new_identity()
* the identity struct is going to the ownership of this library
* it must not be freed by the callee
*
* @warning this callback has to block until an identity or NULL can be returned
* an implementation is not provided by this library; instead it has to be
* implemented by the user of this library
*
*/
typedef pEp_identity *(*retrieve_next_identity_t)(void *management);
/**
* <!-- examine_identity() -->
*
* @brief Callback for appending to queue
*
* @param[in] ident identity to examine
* @param[in] management data structure to deliver (implementation defined)
*
* @retval 0 if identity was added successfully to queue or nonzero otherwise
*
*
*/
typedef int (*examine_identity_t)(pEp_identity *ident, void *management);
/**
* <!-- register_examine_function() -->
*
* @brief Register examine_identity() callback
*
* @param[in] session session to use
* @param[in] examine_identity examine_identity() function to register
* @param[in] management data structure to deliver (implementation defined)
*
* @retval PEP_STATUS_OK
* @retval PEP_ILLEGAL_VALUE illegal parameter values
*
*/
DYNAMIC_API PEP_STATUS register_examine_function(
PEP_SESSION session,
examine_identity_t examine_identity,
void *management
);
/**
* <!-- do_keymanagement() -->
*
* @brief Function to be run on an extra thread
*
* @param[in] retrieve_next_identity pointer to retrieve_next_identity()
* callback which returns at least a valid
* address field in the identity struct
*
* @retval PEP_STATUS_OK if thread has to terminate successfully
* @retval PEP_ILLEGAL_VALUE illegal parameter values
* @retval PEP_OUT_OF_MEMORY out of memory
* @retval any other value on failure
*
* @warning to ensure proper working of this library, a thread has to be started
* with this function immediately after initialization
* do_keymanagement() calls retrieve_next_identity(management)
* messageToSend can only be null if no transport is application based
* if transport system is not used it must not be NULL
*
*/
DYNAMIC_API PEP_STATUS do_keymanagement(
retrieve_next_identity_t retrieve_next_identity,
void *management
);
/**
* <!-- key_mistrusted() -->
*


+ 0
- 2
src/pEp_internal.h View File

@ -298,8 +298,6 @@ struct _pEpSession {
sqlite3_stmt *add_userid_alias;
// callbacks
examine_identity_t examine_identity;
void *examine_management;
notifyHandshake_t notifyHandshake;
inject_sync_event_t inject_sync_event;
retrieve_next_sync_event_t retrieve_next_sync_event;


Loading…
Cancel
Save