Pass response to ykpiv_auth_verifyresponse by value
This commit is contained in:
+2
-2
@@ -2228,7 +2228,7 @@ pub unsafe fn ykpiv_auth_getchallenge(state: &mut YubiKey) -> Result<[u8; 8], Er
|
||||
/// Verify an auth response
|
||||
pub unsafe fn ykpiv_auth_verifyresponse(
|
||||
state: &mut YubiKey,
|
||||
response: &[u8; 8],
|
||||
response: [u8; 8],
|
||||
) -> Result<(), ErrorKind> {
|
||||
let mut data = [0u8; 261];
|
||||
let mut recv_len = data.len() as u32;
|
||||
@@ -2245,7 +2245,7 @@ pub unsafe fn ykpiv_auth_verifyresponse(
|
||||
apdu.data[1] = 0x0a; // 2 + 8
|
||||
apdu.data[2] = 0x82;
|
||||
apdu.data[3] = 8;
|
||||
apdu.data[4..12].copy_from_slice(response);
|
||||
apdu.data[4..12].copy_from_slice(&response);
|
||||
apdu.lc = 12;
|
||||
|
||||
let mut res = _send_data(state, &mut apdu, data.as_mut_ptr(), &mut recv_len, &mut sw);
|
||||
|
||||
Reference in New Issue
Block a user