[][src]Trait parsec_service::providers::Provide

pub trait Provide {
    fn describe(&self) -> ProviderInfo;
fn list_opcodes(&self, _op: OpListOpcodes) -> Result<ResultListOpcodes>; fn list_providers(
        &self,
        _op: OpListProviders
    ) -> Result<ResultListProviders> { ... }
fn ping(&self, _op: OpPing) -> Result<ResultPing> { ... }
fn create_key(
        &self,
        _app_name: ApplicationName,
        _op: OpCreateKey
    ) -> Result<ResultCreateKey> { ... }
fn import_key(
        &self,
        _app_name: ApplicationName,
        _op: OpImportKey
    ) -> Result<ResultImportKey> { ... }
fn export_public_key(
        &self,
        _app_name: ApplicationName,
        _op: OpExportPublicKey
    ) -> Result<ResultExportPublicKey> { ... }
fn destroy_key(
        &self,
        _app_name: ApplicationName,
        _op: OpDestroyKey
    ) -> Result<ResultDestroyKey> { ... }
fn asym_sign(
        &self,
        _app_name: ApplicationName,
        _op: OpAsymSign
    ) -> Result<ResultAsymSign> { ... }
fn asym_verify(
        &self,
        _app_name: ApplicationName,
        _op: OpAsymVerify
    ) -> Result<ResultAsymVerify> { ... } }

Definition of the interface that a provider must implement to be linked into the service through a backend handler.

Required methods

fn describe(&self) -> ProviderInfo

Return a description of the current provider.

The descriptions are gathered in the Core Provider and returned for a ListProviders operation.

fn list_opcodes(&self, _op: OpListOpcodes) -> Result<ResultListOpcodes>

List the opcodes supported by the current provider.

Loading content...

Provided methods

fn list_providers(&self, _op: OpListProviders) -> Result<ResultListProviders>

List the providers running in the service.

fn ping(&self, _op: OpPing) -> Result<ResultPing>

Execute a Ping operation to get the version minor and version major information.

Errors

This operation will only fail if not implemented. It will never fail when being called on the CoreProvider.

fn create_key(
    &self,
    _app_name: ApplicationName,
    _op: OpCreateKey
) -> Result<ResultCreateKey>

Execute a CreateKey operation.

fn import_key(
    &self,
    _app_name: ApplicationName,
    _op: OpImportKey
) -> Result<ResultImportKey>

Execute a ImportKey operation.

fn export_public_key(
    &self,
    _app_name: ApplicationName,
    _op: OpExportPublicKey
) -> Result<ResultExportPublicKey>

Execute a ExportPublicKey operation.

fn destroy_key(
    &self,
    _app_name: ApplicationName,
    _op: OpDestroyKey
) -> Result<ResultDestroyKey>

Execute a DestroyKey operation.

fn asym_sign(
    &self,
    _app_name: ApplicationName,
    _op: OpAsymSign
) -> Result<ResultAsymSign>

Execute a AsymSign operation. This operation only signs the short digest given but does not hash it.

fn asym_verify(
    &self,
    _app_name: ApplicationName,
    _op: OpAsymVerify
) -> Result<ResultAsymVerify>

Execute a AsymVerify operation.

Loading content...

Implementors

impl Provide for CoreProvider[src]

impl Provide for Pkcs11Provider[src]

impl Provide for TpmProvider[src]

Loading content...