Bug #4669
closedEncryptor::fetchKekAndPublishCkData does not call onReady
0%
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
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?
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.
Updated by Anonymous over 5 years ago
Looks like the fix is pushed to GitHub and this can be closed?