Page MenuHomePhabricator

D6778.id23310.diff
No OneTemporary

D6778.id23310.diff

diff --git a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp
--- a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp
+++ b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp
@@ -154,4 +154,22 @@
picklingKey,
callingProcessName);
}
+
+std::string NotificationsCryptoModule::getNotificationsIdentityKeys() {
+ CommSecureStore secureStore{};
+ folly::Optional<std::string> picklingKey = secureStore.get(
+ NotificationsCryptoModule::secureStoreNotificationsAccountDataKey);
+ if (!picklingKey.hasValue()) {
+ throw std::runtime_error(
+ "Attempt to retrieve notifications crypto account before it was "
+ "correctly initialized.");
+ }
+
+ const std::string path =
+ PlatformSpecificTools::getNotificationsCryptoAccountPath();
+ crypto::CryptoModule cryptoModule =
+ NotificationsCryptoModule::deserializeCryptoModule(
+ path, picklingKey.value());
+ return cryptoModule.getIdentityKeys();
+}
} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 1:53 AM (21 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595190
Default Alt Text
D6778.id23310.diff (1 KB)

Event Timeline