mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
shift vendor command space to 0x70 range
this avoids conflicts with OpenSK and open-ssh's handling of their vendor commands.
This commit is contained in:
parent
68902600c2
commit
56172e37a9
2 changed files with 6 additions and 6 deletions
|
|
@ -8,9 +8,9 @@ use crate::{
|
|||
};
|
||||
|
||||
// Vault-specific command to upload TOTP codes
|
||||
pub const COMMAND_RESTORE_TOTP_CODES: u8 = 0x41;
|
||||
pub const COMMAND_BACKUP_TOTP_CODES: u8 = 0x42;
|
||||
pub const COMMAND_RESET_SESSION: u8 = 0x44;
|
||||
pub const COMMAND_RESTORE_TOTP_CODES: u8 = 0x71;
|
||||
pub const COMMAND_BACKUP_TOTP_CODES: u8 = 0x72;
|
||||
pub const COMMAND_RESET_SESSION: u8 = 0x74;
|
||||
|
||||
// TODO(gsora): add something that checks whether or not a command works.
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ fn main() -> Result<()> {
|
|||
let device = ctaphid::Device::connect(&ha, precursor.unwrap())?;
|
||||
log::info!("connected!");
|
||||
|
||||
device.vendor_command(ctaphid::command::VendorCommand::H44, &vec![])?;
|
||||
device.vendor_command(ctaphid::command::VendorCommand::H74, &vec![])?;
|
||||
log::debug!("sent session reset command");
|
||||
|
||||
let start = Instant::now();
|
||||
|
|
@ -108,7 +108,7 @@ fn main() -> Result<()> {
|
|||
let ops: u8 = (&pt).into();
|
||||
|
||||
let wire_data = match device
|
||||
.vendor_command(ctaphid::command::VendorCommand::H42, &vec![ops])
|
||||
.vendor_command(ctaphid::command::VendorCommand::H72, &vec![ops])
|
||||
{
|
||||
Ok(we) => we,
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ fn main() -> Result<()> {
|
|||
let chunk = &chunk;
|
||||
let chunk_bytes: Vec<u8> = chunk.into();
|
||||
let vcres =
|
||||
device.vendor_command(ctaphid::command::VendorCommand::H41, &chunk_bytes)?;
|
||||
device.vendor_command(ctaphid::command::VendorCommand::H71, &chunk_bytes)?;
|
||||
|
||||
if vcres.eq(backup::CONTINUE_RESPONSE) {
|
||||
log::debug!("received CONTINUE response");
|
||||
|
|
|
|||
Loading…
Reference in a new issue