Struct parsec_service::providers::pkcs11::Provider
source · pub struct Provider { /* private fields */ }
Expand description
Provider for Public Key Cryptography Standard #11
Operations for this provider are serviced through a PKCS11 interface, allowing any libraries exposing said interface to be loaded and used at runtime.
Implementations§
source§impl Provider
impl Provider
sourcepub const DEFAULT_PROVIDER_NAME: &'static str = "pkcs11-provider"
pub const DEFAULT_PROVIDER_NAME: &'static str = "pkcs11-provider"
The default provider name for pkcs11 provider
sourcepub const PROVIDER_UUID: &'static str = "30e39502-eba6-4d60-a4af-c518b7f5e38f"
pub const PROVIDER_UUID: &'static str = "30e39502-eba6-4d60-a4af-c518b7f5e38f"
The UUID for this provider
Trait Implementations§
source§impl CanDoCrypto for Provider
impl CanDoCrypto for Provider
source§fn can_do_crypto_internal(
&self,
_application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn can_do_crypto_internal( &self, _application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Provider specific heck if the crypto operation is supported by provider.
This method should be re-implemented by providers.
source§fn use_check_internal(&self, attributes: Attributes) -> Result<Result>
fn use_check_internal(&self, attributes: Attributes) -> Result<Result>
Provider specific Use check.
This method should be re-implemented by providers.
source§fn generate_check_internal(&self, attributes: Attributes) -> Result<Result>
fn generate_check_internal(&self, attributes: Attributes) -> Result<Result>
Provider specific Generate check.
This method should be re-implemented by providers.
source§fn import_check_internal(&self, attributes: Attributes) -> Result<Result>
fn import_check_internal(&self, attributes: Attributes) -> Result<Result>
Provider specific Import check.
This method should be re-implemented by providers.
source§fn can_do_crypto_main(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn can_do_crypto_main( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Check if the crypto operation is supported by provider.
This method is called by Provide trait and doesn’t need to be changed.
source§fn use_check(&self, attributes: Attributes) -> Result<Result>
fn use_check(&self, attributes: Attributes) -> Result<Result>
Common checks if an existing key of the key type that defined in the attributes
and the same length can be used to perform the algorithm in policy.key_algorithm
source§fn generate_check(&self, attributes: Attributes) -> Result<Result>
fn generate_check(&self, attributes: Attributes) -> Result<Result>
Common checks if a key with the attributes can be generated
source§fn import_check(&self, attributes: Attributes) -> Result<Result>
fn import_check(&self, attributes: Attributes) -> Result<Result>
Common checks if a key with the attributes can be imported.
source§fn derive_check(&self, _attributes: Attributes) -> Result<Result>
fn derive_check(&self, _attributes: Attributes) -> Result<Result>
Checks if a key with the attributes can be derived.
source§impl Provide for Provider
impl Provide for Provider
source§fn can_do_crypto(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn can_do_crypto( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Check if the crypto operation is supported by PKCS11 provider by using CanDoCrypto trait.
source§fn describe(&self) -> Result<(ProviderInfo, HashSet<Opcode>)>
fn describe(&self) -> Result<(ProviderInfo, HashSet<Opcode>)>
Return a description of the current provider. Read more
source§fn list_keys(
&self,
application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn list_keys( &self, application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Lists all keys belonging to the application.
source§fn list_clients(&self, _op: Operation) -> Result<Result>
fn list_clients(&self, _op: Operation) -> Result<Result>
Lists all clients currently having data in the service.
source§fn psa_generate_random(&self, op: Operation) -> Result<Result>
fn psa_generate_random(&self, op: Operation) -> Result<Result>
Execute a GenerateRandom operation.
source§fn psa_generate_key(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_generate_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute a GenerateKey operation. Read more
source§fn psa_import_key(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_import_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute an ImportKey operation. Read more
source§fn psa_export_public_key(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_export_public_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute an ExportPublicKey operation.
source§fn psa_destroy_key(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_destroy_key( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute a DestroyKey operation. Read more
source§fn psa_sign_hash(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_sign_hash( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute a SignHash operation. This operation only signs the short digest given but does not
hash it.
source§fn psa_verify_hash(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_verify_hash( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute a VerifyHash operation.
source§fn psa_asymmetric_encrypt(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_asymmetric_encrypt( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute an AsymmetricEncrypt operation.
source§fn psa_asymmetric_decrypt(
&self,
application_identity: &ApplicationIdentity,
op: Operation
) -> Result<Result>
fn psa_asymmetric_decrypt( &self, application_identity: &ApplicationIdentity, op: Operation ) -> Result<Result>
Execute an AsymmetricDecrypt operation.
source§fn list_providers(&self, _op: Operation) -> Result<Result>
fn list_providers(&self, _op: Operation) -> Result<Result>
List the providers running in the service.
source§fn list_opcodes(&self, _op: Operation) -> Result<Result>
fn list_opcodes(&self, _op: Operation) -> Result<Result>
List the opcodes supported by the given provider.
source§fn list_authenticators(&self, _op: Operation) -> Result<Result>
fn list_authenticators(&self, _op: Operation) -> Result<Result>
List the authenticators supported by the given provider.
source§fn delete_client(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn delete_client( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Delete all data a client has in the service..
source§fn ping(&self, _op: Operation) -> Result<Result>
fn ping(&self, _op: Operation) -> Result<Result>
Execute a Ping operation to get the wire protocol version major and minor information. Read more
source§fn psa_export_key(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_export_key( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Execute an ExportKey operation.
source§fn psa_aead_encrypt(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_aead_encrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Execute an AeadEncrypt operation.
source§fn psa_aead_decrypt(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_aead_decrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Execute an AeadDecrypt operation.
source§fn psa_raw_key_agreement(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_raw_key_agreement( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Execute a RawKeyAgreement operation.
source§fn psa_cipher_encrypt(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_cipher_encrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Encrypt a short message with a symmetric cipher.
source§fn psa_cipher_decrypt(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_cipher_decrypt( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Decrypt a short message with a symmetric cipher.
source§fn psa_sign_message(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_sign_message( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Sign a message with a private key.
source§fn psa_verify_message(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn psa_verify_message( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Verify the signature of a message using a public key.
source§fn prepare_key_attestation(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn prepare_key_attestation( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Prepare a key attestation operation.
source§fn attest_key(
&self,
_application_identity: &ApplicationIdentity,
_op: Operation
) -> Result<Result>
fn attest_key( &self, _application_identity: &ApplicationIdentity, _op: Operation ) -> Result<Result>
Attest a key.
Auto Trait Implementations§
impl !Freeze for Provider
impl !RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl !UnwindSafe for Provider
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more