feat: update pkcs11 piv
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use tracing::instrument;
|
||||
use yubikey::YubiKey;
|
||||
|
||||
use native_pkcs11_traits::{Backend, KeySearchOptions};
|
||||
use native_pkcs11_traits::Certificate as P11Certificate;
|
||||
@@ -25,11 +26,15 @@ use native_pkcs11_traits::PublicKey as P11PublicKey;
|
||||
use native_pkcs11_traits::Result as P11Result;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct YubikeyPivBackend;
|
||||
pub struct YubikeyPivBackend {
|
||||
yubikey: Option<YubiKey>,
|
||||
}
|
||||
|
||||
impl YubikeyPivBackend {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
YubikeyPivBackend {
|
||||
yubikey: None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ cryptoki_fn!(
|
||||
unsafe { *ppFunctionList = std::ptr::addr_of_mut!(FUNC_LIST) };
|
||||
|
||||
native_pkcs11_traits::register_backend(Box::new(
|
||||
native_pkcs11_piv::YubikeyPivBackend {},
|
||||
native_pkcs11_piv::YubikeyPivBackend::new(),
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user