From 76e693240d50cd99017b5a48ea083d25855fb122 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Mon, 20 Nov 2017 20:02:03 +0300 Subject: [PATCH] fix after merge --- secret_store/src/listener/http_listener.rs | 6 ------ secret_store/src/listener/mod.rs | 11 +++++++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/secret_store/src/listener/http_listener.rs b/secret_store/src/listener/http_listener.rs index b8d661f07..3350b51d4 100644 --- a/secret_store/src/listener/http_listener.rs +++ b/secret_store/src/listener/http_listener.rs @@ -31,12 +31,6 @@ use traits::KeyServer; use serialization::{SerializableEncryptedDocumentKeyShadow, SerializableBytes, SerializablePublic}; use types::all::{Error, Public, MessageHash, NodeAddress, RequestSignature, ServerKeyId, EncryptedDocumentKey, EncryptedDocumentKeyShadow, NodeId}; -/*======= -use traits::{ServerKeyGenerator, AdminSessionsServer, DocumentKeyServer, MessageSigner, KeyServer}; -use serialization::{SerializableEncryptedDocumentKeyShadow, SerializableBytes, SerializablePublic}; -use types::all::{Error, Public, MessageHash, EncryptedMessageSignature, NodeAddress, RequestSignature, ServerKeyId, - EncryptedDocumentKey, EncryptedDocumentKeyShadow, NodeId}; ->>>>>>> master:secret_store/src/http_listener.rs*/ /// Key server http-requests listener. Available requests: /// To generate server key: POST /shadow/{server_key_id}/{signature}/{threshold} diff --git a/secret_store/src/listener/mod.rs b/secret_store/src/listener/mod.rs index 858f01ee0..1ebe4aa47 100644 --- a/secret_store/src/listener/mod.rs +++ b/secret_store/src/listener/mod.rs @@ -1,10 +1,11 @@ pub mod http_listener; pub mod service_contract_listener; +use std::collections::BTreeSet; use std::sync::Arc; -use traits::{ServerKeyGenerator, DocumentKeyServer, MessageSigner, KeyServer}; +use traits::{ServerKeyGenerator, DocumentKeyServer, MessageSigner, AdminSessionsServer, KeyServer}; use types::all::{Error, Public, MessageHash, EncryptedMessageSignature, RequestSignature, ServerKeyId, - EncryptedDocumentKey, EncryptedDocumentKeyShadow}; + EncryptedDocumentKey, EncryptedDocumentKeyShadow, NodeId}; pub struct Listener { key_server: Arc, @@ -53,3 +54,9 @@ impl MessageSigner for Listener { self.key_server.sign_message(key_id, signature, message) } } + +impl AdminSessionsServer for Listener { + fn change_servers_set(&self, old_set_signature: RequestSignature, new_set_signature: RequestSignature, new_servers_set: BTreeSet) -> Result<(), Error> { + self.key_server.change_servers_set(old_set_signature, new_set_signature, new_servers_set) + } +} \ No newline at end of file