Trait lair_keystore_api::actor::LairClientApiHandler [−][src]
pub trait LairClientApiHandler: GhostHandler<LairClientApi> {
Show 21 methods
fn handle_lair_get_server_info(
&mut self
) -> LairClientApiHandlerResult<LairServerInfo>;
fn handle_lair_get_last_entry_index(
&mut self
) -> LairClientApiHandlerResult<KeystoreIndex>;
fn handle_lair_get_entry_type(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<LairEntryType>;
fn handle_tls_cert_new_self_signed_from_entropy(
&mut self,
options: TlsCertOptions
) -> LairClientApiHandlerResult<(KeystoreIndex, CertSni, CertDigest)>;
fn handle_tls_cert_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<(CertSni, CertDigest)>;
fn handle_tls_cert_get_cert_by_index(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<Cert>;
fn handle_tls_cert_get_cert_by_digest(
&mut self,
cert_digest: CertDigest
) -> LairClientApiHandlerResult<Cert>;
fn handle_tls_cert_get_cert_by_sni(
&mut self,
cert_sni: CertSni
) -> LairClientApiHandlerResult<Cert>;
fn handle_tls_cert_get_priv_key_by_index(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<CertPrivKey>;
fn handle_tls_cert_get_priv_key_by_digest(
&mut self,
cert_digest: CertDigest
) -> LairClientApiHandlerResult<CertPrivKey>;
fn handle_tls_cert_get_priv_key_by_sni(
&mut self,
cert_sni: CertSni
) -> LairClientApiHandlerResult<CertPrivKey>;
fn handle_sign_ed25519_new_from_entropy(
&mut self
) -> LairClientApiHandlerResult<(KeystoreIndex, SignEd25519PubKey)>;
fn handle_sign_ed25519_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<SignEd25519PubKey>;
fn handle_sign_ed25519_sign_by_index(
&mut self,
keystore_index: KeystoreIndex,
message: Arc<Vec<u8>>
) -> LairClientApiHandlerResult<SignEd25519Signature>;
fn handle_sign_ed25519_sign_by_pub_key(
&mut self,
pub_key: SignEd25519PubKey,
message: Arc<Vec<u8>>
) -> LairClientApiHandlerResult<SignEd25519Signature>;
fn handle_x25519_new_from_entropy(
&mut self
) -> LairClientApiHandlerResult<(KeystoreIndex, X25519PubKey)>;
fn handle_x25519_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<X25519PubKey>;
fn handle_crypto_box_by_index(
&mut self,
keystore_index: KeystoreIndex,
recipient: X25519PubKey,
data: Arc<CryptoBoxData>
) -> LairClientApiHandlerResult<CryptoBoxEncryptedData>;
fn handle_crypto_box_by_pub_key(
&mut self,
pub_key: X25519PubKey,
recipient: X25519PubKey,
data: Arc<CryptoBoxData>
) -> LairClientApiHandlerResult<CryptoBoxEncryptedData>;
fn handle_crypto_box_open_by_index(
&mut self,
keystore_index: KeystoreIndex,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairClientApiHandlerResult<Option<CryptoBoxData>>;
fn handle_crypto_box_open_by_pub_key(
&mut self,
pub_key: X25519PubKey,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairClientApiHandlerResult<Option<CryptoBoxData>>;
}
Expand description
Lair Client Actor Api.
Required methods
fn handle_lair_get_server_info(
&mut self
) -> LairClientApiHandlerResult<LairServerInfo>
fn handle_lair_get_server_info(
&mut self
) -> LairClientApiHandlerResult<LairServerInfo>
Get lair server info.
fn handle_lair_get_last_entry_index(
&mut self
) -> LairClientApiHandlerResult<KeystoreIndex>
fn handle_lair_get_last_entry_index(
&mut self
) -> LairClientApiHandlerResult<KeystoreIndex>
Get the highest entry index. Note, some entries my be stubs / erased values.
fn handle_lair_get_entry_type(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<LairEntryType>
fn handle_lair_get_entry_type(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<LairEntryType>
Get the entry type for a given index.
fn handle_tls_cert_new_self_signed_from_entropy(
&mut self,
options: TlsCertOptions
) -> LairClientApiHandlerResult<(KeystoreIndex, CertSni, CertDigest)>
fn handle_tls_cert_new_self_signed_from_entropy(
&mut self,
options: TlsCertOptions
) -> LairClientApiHandlerResult<(KeystoreIndex, CertSni, CertDigest)>
Create a new self-signed tls certificate.
fn handle_tls_cert_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<(CertSni, CertDigest)>
fn handle_tls_cert_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<(CertSni, CertDigest)>
Get tls cert info by keystore index.
fn handle_tls_cert_get_cert_by_index(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<Cert>
fn handle_tls_cert_get_cert_by_index(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<Cert>
Fetch the certificate by entry index.
fn handle_tls_cert_get_cert_by_digest(
&mut self,
cert_digest: CertDigest
) -> LairClientApiHandlerResult<Cert>
fn handle_tls_cert_get_cert_by_digest(
&mut self,
cert_digest: CertDigest
) -> LairClientApiHandlerResult<Cert>
Fetch the certificate by digest.
fn handle_tls_cert_get_cert_by_sni(
&mut self,
cert_sni: CertSni
) -> LairClientApiHandlerResult<Cert>
fn handle_tls_cert_get_cert_by_sni(
&mut self,
cert_sni: CertSni
) -> LairClientApiHandlerResult<Cert>
Fetch the certificate by sni.
fn handle_tls_cert_get_priv_key_by_index(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<CertPrivKey>
fn handle_tls_cert_get_priv_key_by_index(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<CertPrivKey>
Fetch the certificate private key by entry index.
fn handle_tls_cert_get_priv_key_by_digest(
&mut self,
cert_digest: CertDigest
) -> LairClientApiHandlerResult<CertPrivKey>
fn handle_tls_cert_get_priv_key_by_digest(
&mut self,
cert_digest: CertDigest
) -> LairClientApiHandlerResult<CertPrivKey>
Fetch the certificate private key by digest.
fn handle_tls_cert_get_priv_key_by_sni(
&mut self,
cert_sni: CertSni
) -> LairClientApiHandlerResult<CertPrivKey>
fn handle_tls_cert_get_priv_key_by_sni(
&mut self,
cert_sni: CertSni
) -> LairClientApiHandlerResult<CertPrivKey>
Fetch the certificate private key by sni.
Create a new signature ed25519 keypair from entropy.
fn handle_sign_ed25519_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<SignEd25519PubKey>
fn handle_sign_ed25519_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<SignEd25519PubKey>
Get ed25519 keypair info by keystore index.
fn handle_sign_ed25519_sign_by_index(
&mut self,
keystore_index: KeystoreIndex,
message: Arc<Vec<u8>>
) -> LairClientApiHandlerResult<SignEd25519Signature>
fn handle_sign_ed25519_sign_by_index(
&mut self,
keystore_index: KeystoreIndex,
message: Arc<Vec<u8>>
) -> LairClientApiHandlerResult<SignEd25519Signature>
Generate a signature for message by keystore index.
fn handle_sign_ed25519_sign_by_pub_key(
&mut self,
pub_key: SignEd25519PubKey,
message: Arc<Vec<u8>>
) -> LairClientApiHandlerResult<SignEd25519Signature>
fn handle_sign_ed25519_sign_by_pub_key(
&mut self,
pub_key: SignEd25519PubKey,
message: Arc<Vec<u8>>
) -> LairClientApiHandlerResult<SignEd25519Signature>
Generate a signature for message by signature pub key.
fn handle_x25519_new_from_entropy(
&mut self
) -> LairClientApiHandlerResult<(KeystoreIndex, X25519PubKey)>
fn handle_x25519_new_from_entropy(
&mut self
) -> LairClientApiHandlerResult<(KeystoreIndex, X25519PubKey)>
Generate new x25519 keypair from entropy.
fn handle_x25519_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<X25519PubKey>
fn handle_x25519_get(
&mut self,
keystore_index: KeystoreIndex
) -> LairClientApiHandlerResult<X25519PubKey>
Get x25519 keypair by keystore index.
fn handle_crypto_box_by_index(
&mut self,
keystore_index: KeystoreIndex,
recipient: X25519PubKey,
data: Arc<CryptoBoxData>
) -> LairClientApiHandlerResult<CryptoBoxEncryptedData>
fn handle_crypto_box_by_index(
&mut self,
keystore_index: KeystoreIndex,
recipient: X25519PubKey,
data: Arc<CryptoBoxData>
) -> LairClientApiHandlerResult<CryptoBoxEncryptedData>
Generate encrypted crypto box data by sender keystore index for recipient pubkey.
fn handle_crypto_box_by_pub_key(
&mut self,
pub_key: X25519PubKey,
recipient: X25519PubKey,
data: Arc<CryptoBoxData>
) -> LairClientApiHandlerResult<CryptoBoxEncryptedData>
fn handle_crypto_box_by_pub_key(
&mut self,
pub_key: X25519PubKey,
recipient: X25519PubKey,
data: Arc<CryptoBoxData>
) -> LairClientApiHandlerResult<CryptoBoxEncryptedData>
Generate encrypted crypto box data by sender pubkey for recipient pubkey.
fn handle_crypto_box_open_by_index(
&mut self,
keystore_index: KeystoreIndex,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairClientApiHandlerResult<Option<CryptoBoxData>>
fn handle_crypto_box_open_by_index(
&mut self,
keystore_index: KeystoreIndex,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairClientApiHandlerResult<Option<CryptoBoxData>>
Open crypto box previously generated by recipient keystore index from sender pubkey.
fn handle_crypto_box_open_by_pub_key(
&mut self,
pub_key: X25519PubKey,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairClientApiHandlerResult<Option<CryptoBoxData>>
fn handle_crypto_box_open_by_pub_key(
&mut self,
pub_key: X25519PubKey,
sender: X25519PubKey,
encrypted_data: Arc<CryptoBoxEncryptedData>
) -> LairClientApiHandlerResult<Option<CryptoBoxData>>
Open crypto box previously generated by recipient pubkey from sender pubkey.