Project

General

Profile

Actions

Bug #4669

closed

Encryptor::fetchKekAndPublishCkData does not call onReady

Added by Anonymous almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
07/17/2018
Due date:
% Done:

0%

Estimated time:

Description

Encryptor::fetchKekAndPublishCkData has a parameter onReady which should be called when the KEK is published.
https://github.com/named-data/name-based-access-control/blob/da366d88ae6905b5e0f79e62168e58fb2dab4079/src/encryptor.cpp#L139

Encryptor::retryFetchingKek uses this to set m_isKekRetrievalInProgress false when finished.
https://github.com/named-data/name-based-access-control/blob/da366d88ae6905b5e0f79e62168e58fb2dab4079/src/encryptor.cpp#L87

But it looks like fetchKekAndPublishCkData never calls onReady, so retryFetchingKek can't set m_isKekRetrievalInProgress false. Maybe need to call onReady here in the OnData callback?
https://github.com/named-data/name-based-access-control/blob/da366d88ae6905b5e0f79e62168e58fb2dab4079/src/encryptor.cpp#L157

Actions #1

Updated by Anonymous almost 6 years ago

... Or instead of calling onReady in the OnData callback, maybe onReady needs to be passed to makeAndPublishCkData so that onReady is only called when publish succeeds?

Actions #2

Updated by Alex Afanasyev almost 6 years ago

makeAndPublishCkData is kind of sync operation and not sure it needs this callback. Also, because it is used in two quite different places, I think that onReady should be called in onData (with a condition that makeAndPublishCkData succeeded). I will submit a fix soon.

Actions #4

Updated by Anonymous over 5 years ago

Looks like the fix is pushed to GitHub and this can be closed?

Actions #5

Updated by Anonymous over 5 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF