aboutsummaryrefslogtreecommitdiff
path: root/src/auth.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/auth.rs b/src/auth.rs
index 6748ca1..5ca59da 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -8,8 +8,6 @@ use std::ops;
use std::os::raw::c_char;
use std::os::raw::c_int;
-use nitrokey_sys;
-
use crate::config::{Config, RawConfig};
use crate::device::{Device, DeviceWrapper, Pro, Storage};
use crate::error::Error;
@@ -128,7 +126,7 @@ trait AuthenticatedDevice<T> {
/// method.
///
/// [`Authenticate`]: trait.Authenticate.html
-/// [`authenticate_admin`]: trait.Authenticate.html#method.authenticate_admin
+/// [`authenticate_user`]: trait.Authenticate.html#method.authenticate_user
/// [`device`]: #method.device
#[derive(Debug)]
pub struct User<'a, T: Device<'a>> {
@@ -280,7 +278,8 @@ impl<'a, T: Device<'a>> Admin<'a, T> {
///
/// # Errors
///
- /// - [`InvalidSlot`][] if the provided numlock, capslock or scrolllock slot is larger than two
+ /// - [`InvalidSlot`][] if the provided Num Lock, Caps Lock or Scroll Lock slot is larger than
+ /// two
///
/// # Example
///
@@ -308,9 +307,9 @@ impl<'a, T: Device<'a>> Admin<'a, T> {
let raw_config = RawConfig::try_from(config)?;
get_command_result(unsafe {
nitrokey_sys::NK_write_config(
- raw_config.numlock,
- raw_config.capslock,
- raw_config.scrollock,
+ raw_config.num_lock,
+ raw_config.caps_lock,
+ raw_config.scroll_lock,
raw_config.user_password,
false,
self.temp_password.as_ptr(),