removed keystore update attempt
@@ -152,44 +152,3 @@ impl<Link: fmt::Display> fmt::Display for KeyStore<Link> {
Ok(())
}
}
-
-#[derive(Debug, PartialEq)]
-pub enum Key {
- PK(x25519::PublicKey),
- Psk(Psk),
-}
-
-impl From<x25519::PublicKey> for Key {
- fn from(item: x25519::PublicKey) -> Self {
- Self::PK(item)
- }
-}
-
-impl From<Psk> for Key {
- fn from(item: Psk) -> Self {
- Self::Psk(item)
- }
-}
-
-#[derive(Debug)]
-pub struct KeyStore2 {
- keys: HashMap<Identifier, Key>,
-}
-
-impl KeyStore2 {
- pub fn add_key(&mut self, identifier: Identifier, key: impl Into<Key>) -> Result<()> {
- let key_into = key.into();
- match (identifier, &key_into) {
- (Identifier::EdPubKey(_), &Key::PK(_)) | (Identifier::PskId(_), &Key::Psk(_)) => {
- self.keys.insert(identifier, key_into);
- Ok(())
- }
- #[cfg(feature = "did")]
- (Identifier::DID(_), &Key::PK(_)) => {
- self.keys.insert(identifier, key_into);
- Ok(())
- }
- _ => err(BadIdentifier),
- }
- }
-}
