Created
April 28, 2021 19:37
-
-
Save neonphog/38468f0c950312142f7435d8a6875404 to your computer and use it in GitHub Desktop.
err-test.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ErrTest; | |
impl ghost_actor::GhostControlHandler for ErrTest {} | |
impl ghost_actor::GhostHandler<LairClientApi> for ErrTest {} | |
impl LairClientApiHandler for ErrTest { | |
fn handle_lair_get_server_info( | |
&mut self, | |
) -> LairClientApiHandlerResult<LairServerInfo> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_lair_get_last_entry_index( | |
&mut self, | |
) -> LairClientApiHandlerResult<KeystoreIndex> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_lair_get_entry_type( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
) -> LairClientApiHandlerResult<LairEntryType> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_new_self_signed_from_entropy( | |
&mut self, | |
_options: TlsCertOptions, | |
) -> LairClientApiHandlerResult<(KeystoreIndex, CertSni, CertDigest)> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
) -> LairClientApiHandlerResult<(CertSni, CertDigest)> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get_cert_by_index( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
) -> LairClientApiHandlerResult<Cert> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get_cert_by_digest( | |
&mut self, | |
_cert_digest: CertDigest, | |
) -> LairClientApiHandlerResult<Cert> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get_cert_by_sni( | |
&mut self, | |
_cert_sni: CertSni, | |
) -> LairClientApiHandlerResult<Cert> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get_priv_key_by_index( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
) -> LairClientApiHandlerResult<CertPrivKey> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get_priv_key_by_digest( | |
&mut self, | |
_cert_digest: CertDigest, | |
) -> LairClientApiHandlerResult<CertPrivKey> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_tls_cert_get_priv_key_by_sni( | |
&mut self, | |
_cert_sni: CertSni, | |
) -> LairClientApiHandlerResult<CertPrivKey> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_sign_ed25519_new_from_entropy( | |
&mut self, | |
) -> LairClientApiHandlerResult<( | |
KeystoreIndex, | |
sign_ed25519::SignEd25519PubKey, | |
)> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_sign_ed25519_get( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
) -> LairClientApiHandlerResult<sign_ed25519::SignEd25519PubKey> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_sign_ed25519_sign_by_index( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
_message: Arc<Vec<u8>>, | |
) -> LairClientApiHandlerResult<sign_ed25519::SignEd25519Signature> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_sign_ed25519_sign_by_pub_key( | |
&mut self, | |
_pub_key: sign_ed25519::SignEd25519PubKey, | |
_message: Arc<Vec<u8>>, | |
) -> LairClientApiHandlerResult<sign_ed25519::SignEd25519Signature> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_x25519_new_from_entropy( | |
&mut self, | |
) -> LairClientApiHandlerResult<(KeystoreIndex, x25519::X25519PubKey)> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_x25519_get( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
) -> LairClientApiHandlerResult<x25519::X25519PubKey> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_crypto_box_by_index( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
_recipient: x25519::X25519PubKey, | |
_data: Arc<crypto_box::CryptoBoxData>, | |
) -> LairClientApiHandlerResult<crypto_box::CryptoBoxEncryptedData> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_crypto_box_by_pub_key( | |
&mut self, | |
_pub_key: x25519::X25519PubKey, | |
_recipient: x25519::X25519PubKey, | |
_data: Arc<crypto_box::CryptoBoxData>, | |
) -> LairClientApiHandlerResult<crypto_box::CryptoBoxEncryptedData> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_crypto_box_open_by_index( | |
&mut self, | |
_keystore_index: KeystoreIndex, | |
_sender: x25519::X25519PubKey, | |
_encrypted_data: Arc<crypto_box::CryptoBoxEncryptedData>, | |
) -> LairClientApiHandlerResult<Option<crypto_box::CryptoBoxData>> { | |
Err(LairError::other("err-test") | |
} | |
fn handle_crypto_box_open_by_pub_key( | |
&mut self, | |
_pub_key: x25519::X25519PubKey, | |
_sender: x25519::X25519PubKey, | |
_encrypted_data: Arc<crypto_box::CryptoBoxEncryptedData>, | |
) -> LairClientApiHandlerResult<Option<crypto_box::CryptoBoxData>> { | |
Err(LairError::other("err-test") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment