fix after merge

This commit is contained in:
Svyatoslav Nikolsky 2017-11-20 20:02:03 +03:00
parent b5fad300ba
commit 76e693240d
2 changed files with 9 additions and 8 deletions

View File

@ -31,12 +31,6 @@ use traits::KeyServer;
use serialization::{SerializableEncryptedDocumentKeyShadow, SerializableBytes, SerializablePublic}; use serialization::{SerializableEncryptedDocumentKeyShadow, SerializableBytes, SerializablePublic};
use types::all::{Error, Public, MessageHash, NodeAddress, RequestSignature, ServerKeyId, use types::all::{Error, Public, MessageHash, NodeAddress, RequestSignature, ServerKeyId,
EncryptedDocumentKey, EncryptedDocumentKeyShadow, NodeId}; 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: /// Key server http-requests listener. Available requests:
/// To generate server key: POST /shadow/{server_key_id}/{signature}/{threshold} /// To generate server key: POST /shadow/{server_key_id}/{signature}/{threshold}

View File

@ -1,10 +1,11 @@
pub mod http_listener; pub mod http_listener;
pub mod service_contract_listener; pub mod service_contract_listener;
use std::collections::BTreeSet;
use std::sync::Arc; 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, use types::all::{Error, Public, MessageHash, EncryptedMessageSignature, RequestSignature, ServerKeyId,
EncryptedDocumentKey, EncryptedDocumentKeyShadow}; EncryptedDocumentKey, EncryptedDocumentKeyShadow, NodeId};
pub struct Listener { pub struct Listener {
key_server: Arc<KeyServer>, key_server: Arc<KeyServer>,
@ -53,3 +54,9 @@ impl MessageSigner for Listener {
self.key_server.sign_message(key_id, signature, message) 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<NodeId>) -> Result<(), Error> {
self.key_server.change_servers_set(old_set_signature, new_set_signature, new_servers_set)
}
}