llcache: Actually pass on certificate chain properly

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-05-04 18:29:33 +01:00
parent 18dd34babf
commit bb5d5562bc
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
1 changed files with 10 additions and 5 deletions

View File

@ -3081,12 +3081,17 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
/* Persist the chain onto our object */
error = cert_chain_dup(msg->data.chain, &object->chain);
if (error != NSERROR_OK) {
/* Now pass on the event */
event.type = LLCACHE_EVENT_GOT_CERTS;
event.data.chain = msg->data.chain;
error = llcache_send_event_to_users(object, &event);
NSLOG(llcache, ERROR,
"Unable to duplicate cert chain into cache: %s",
messages_get_errorcode(error));
}
/* Now pass on the event */
event.type = LLCACHE_EVENT_GOT_CERTS;
event.data.chain = msg->data.chain;
error = llcache_send_event_to_users(object, &event);
break;
/* Events requiring action */