chore: reorg use
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
use std::ops::Deref;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
use yubico_manager::Yubico;
|
||||
use yubico_manager::config::{Config, Mode, Slot};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use std::collections::BTreeMap;
|
||||
use std::ops::Deref;
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use yubico_manager::config::{Config, Mode, Slot};
|
||||
use yubico_manager::Yubico;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
use yubico_manager::Yubico;
|
||||
use yubico_manager::config::Config;
|
||||
use yubico_manager::hmacmode::HmacKey;
|
||||
use yubico_manager::configure::DeviceModeConfig;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use yubico_manager::config::Config;
|
||||
use yubico_manager::configure::DeviceModeConfig;
|
||||
use yubico_manager::hmacmode::HmacKey;
|
||||
use yubico_manager::Yubico;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
use pem::Pem;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
use chrono::{DateTime, Local};
|
||||
use openssl::rsa::Rsa;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use openssl::bn::BigNum;
|
||||
use sequoia_openpgp::Packet;
|
||||
use sequoia_openpgp::parse::Parse;
|
||||
use sequoia_openpgp::packet::{Key, Signature};
|
||||
use sequoia_openpgp::crypto::mpi::PublicKey;
|
||||
use sequoia_openpgp::parse::{PacketParser, PacketParserResult};
|
||||
use sequoia_openpgp::packet::signature::subpacket::SubpacketTag;
|
||||
use openssl::rsa::Rsa;
|
||||
use pem::Pem;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use sequoia_openpgp::crypto::mpi::PublicKey;
|
||||
use sequoia_openpgp::Packet;
|
||||
use sequoia_openpgp::packet::{Key, Signature};
|
||||
use sequoia_openpgp::packet::signature::subpacket::SubpacketTag;
|
||||
use sequoia_openpgp::parse::{PacketParser, PacketParserResult};
|
||||
use sequoia_openpgp::parse::Parse;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::collections::BTreeMap;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use openpgp_card::DecryptMe;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
use openpgp_card::{OpenPGPCard, DecryptMe, Hash, KeyType};
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use openpgp_card::{DecryptMe, Hash, KeyType, OpenPGPCard};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use std::collections::BTreeMap;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use openpgp_card::Hash;
|
||||
use rust_util::XResult;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::XResult;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
use std::time::Duration;
|
||||
use pem::Pem;
|
||||
use sha2::Sha256;
|
||||
use digest::Digest;
|
||||
|
||||
use chrono::Local;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
use yubikey::{YubiKey, Certificate};
|
||||
use yubikey::piv::SlotId;
|
||||
use x509_parser::parse_x509_certificate;
|
||||
use rust_util::XResult;
|
||||
use rust_util::util_msg::MessageType;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use digest::Digest;
|
||||
use pem::Pem;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::util_msg::MessageType;
|
||||
use rust_util::XResult;
|
||||
use sha2::Sha256;
|
||||
use x509_parser::parse_x509_certificate;
|
||||
use yubikey::{Certificate, YubiKey};
|
||||
use yubikey::piv::SlotId;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use yubikey::piv::{AlgorithmId, SlotId};
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
use std::sync::mpsc::channel;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
|
||||
use authenticator::authenticatorservice::AuthenticatorService;
|
||||
use authenticator::statecallback::StateCallback;
|
||||
use authenticator::RegisterFlags;
|
||||
use authenticator::statecallback::StateCallback;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use crate::fido;
|
||||
|
||||
use crate::digest;
|
||||
use crate::fido::{U2fV2Challenge, U2fRegistrationData};
|
||||
use crate::fido;
|
||||
use crate::fido::{U2fRegistrationData, U2fV2Challenge};
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
use std::sync::mpsc::channel;
|
||||
use clap::{ArgMatches, SubCommand, App, Arg};
|
||||
use authenticator::{KeyHandle, AuthenticatorTransports, SignFlags};
|
||||
use authenticator::statecallback::StateCallback;
|
||||
|
||||
use authenticator::{AuthenticatorTransports, KeyHandle, SignFlags};
|
||||
use authenticator::authenticatorservice::AuthenticatorService;
|
||||
use authenticator::statecallback::StateCallback;
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use crate::fido;
|
||||
|
||||
use crate::digest;
|
||||
use crate::fido;
|
||||
use crate::fido::U2fV2Challenge;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use sha2::{Digest, Sha256, Sha384, Sha512};
|
||||
|
||||
// use sha1::Sha1;
|
||||
|
||||
// pub fn sha1(input: &str) -> Vec<u8> {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
use std::fmt;
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use rand::Rng;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use authenticator::{StatusUpdate, RegisterResult};
|
||||
use std::thread;
|
||||
|
||||
use authenticator::{RegisterResult, StatusUpdate};
|
||||
use base64::URL_SAFE_NO_PAD;
|
||||
use rand::Rng;
|
||||
use rust_util::XResult;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct U2FDeviceInfo {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#[macro_use]
|
||||
extern crate rust_util;
|
||||
|
||||
use clap::{App, AppSettings, ArgMatches};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
|
||||
mod fido;
|
||||
mod digest;
|
||||
mod cmd_register;
|
||||
@@ -15,9 +18,6 @@ mod cmd_pivsign;
|
||||
mod cmd_chall;
|
||||
mod cmd_challconfig;
|
||||
|
||||
use clap::{App, AppSettings, ArgMatches};
|
||||
use rust_util::util_clap::{CommandError, Command};
|
||||
|
||||
pub struct DefaultCommandImpl;
|
||||
|
||||
impl DefaultCommandImpl {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use openpgp_card::{OpenPGPCard, OpenPGPCardUser};
|
||||
use rust_util::XResult;
|
||||
use openpgp_card::{OpenPGPCardUser, OpenPGPCard};
|
||||
|
||||
pub fn get_card_user_sw1_81(pass: &str) -> XResult<OpenPGPCardUser> {
|
||||
match OpenPGPCard::list_cards() {
|
||||
|
||||
Reference in New Issue
Block a user