summaryrefslogtreecommitdiff
path: root/src/manager/service/encryption-service.cpp
diff options
context:
space:
mode:
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>2015-09-01 15:23:52 +0200
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2015-09-08 09:31:40 +0200
commitd5e32f8787a2b079e0650fbe20211ff9da1afdfd (patch)
treee90de3a918957f4b21d446a61a6d4ab4056918df /src/manager/service/encryption-service.cpp
parent96a64db011ddc1f7da23deb1bbb7811d99866012 (diff)
downloadkey-manager-d5e32f8787a2b079e0650fbe20211ff9da1afdfd.tar.gz
key-manager-d5e32f8787a2b079e0650fbe20211ff9da1afdfd.tar.bz2
key-manager-d5e32f8787a2b079e0650fbe20211ff9da1afdfd.zip
Integration with cynara.
Change-Id: I75f727890d37b39e7054db4c68baad922eef1fc3
Diffstat (limited to 'src/manager/service/encryption-service.cpp')
-rw-r--r--src/manager/service/encryption-service.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/manager/service/encryption-service.cpp b/src/manager/service/encryption-service.cpp
index f08dbfa7..f5de2718 100644
--- a/src/manager/service/encryption-service.cpp
+++ b/src/manager/service/encryption-service.cpp
@@ -64,7 +64,7 @@ void EncryptionService::RequestKey(const CryptoRequest& request)
GenericSocketService::ServiceDescriptionVector EncryptionService::GetServiceDescription()
{
return ServiceDescriptionVector {
- {SERVICE_SOCKET_ENCRYPTION, "key-manager::api-encryption", SOCKET_ID_ENCRYPTION}
+ {SERVICE_SOCKET_ENCRYPTION, "http://tizen.org/privilege/keymanager", SOCKET_ID_ENCRYPTION}
};
}
@@ -82,9 +82,12 @@ void EncryptionService::SetCommManager(CommMgr *manager)
Register(*manager);
}
+// Encryption Service does not support any kind of security-check
+// and 3rd parameter is not required
bool EncryptionService::ProcessOne(
const ConnectionID &conn,
- ConnectionInfo &info)
+ ConnectionInfo &info,
+ bool /*allowed*/)
{
LogDebug ("process One");
try {
@@ -127,4 +130,15 @@ void EncryptionService::ProcessEncryption(const ConnectionID &conn,
m_logic.Crypt(req);
}
+void EncryptionService::CustomHandle(const ReadEvent &event) {
+ LogDebug("Read event");
+ auto &info = m_connectionInfoMap[event.connectionID.counter];
+ info.buffer.Push(event.rawBuffer);
+ while(ProcessOne(event.connectionID, info, true));
+}
+
+void EncryptionService::CustomHandle(const SecurityEvent &/*event*/) {
+ LogError("This should not happend! SecurityEvent was called on EncryptionService!");
+}
+
} /* namespace CKM */