encryptor: Continuosly retry fetching KEK forever
With this change, Encryptor will continue to retry fetching KEK until
success. Each failed attempt will be notified to application via
onFailure callback supplied during Encryptor construction.
Change-Id: I48017b5d25bb77d9f7cfb45b21a9816fb99c33dd
diff --git a/src/common.hpp b/src/common.hpp
index b8523e9..a84c66c 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -109,6 +109,9 @@
const time::seconds DEFAULT_KDK_FRESHNESS_PERIOD = 1_h;
const time::seconds DEFAULT_CK_FRESHNESS_PERIOD = 1_h;
+const time::seconds RETRY_DELAY_AFTER_NACK = 1_s;
+const time::seconds RETRY_DELAY_KEK_RETRIEVAL = 60_s;
+
enum class ErrorCode {
KekRetrievalFailure = 1,
KekRetrievalTimeout = 2,