From 5440fdeb1e4be5bb67423e8867c625a223d1cec4 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Wed, 30 Aug 2023 14:05:57 +0200 Subject: [PATCH] openpgp-card: move `commands` out of the `apdu` module --- openpgp-card/src/apdu.rs | 6 +++--- openpgp-card/src/{apdu => }/commands.rs | 0 openpgp-card/src/keys.rs | 2 +- openpgp-card/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename openpgp-card/src/{apdu => }/commands.rs (100%) diff --git a/openpgp-card/src/apdu.rs b/openpgp-card/src/apdu.rs index 7f9dec0..5b85bb4 100644 --- a/openpgp-card/src/apdu.rs +++ b/openpgp-card/src/apdu.rs @@ -5,15 +5,15 @@ //! Commands and responses to commands pub(crate) mod command; -pub(crate) mod commands; pub mod response; use std::convert::TryFrom; use card_backend::{CardCaps, CardTransaction}; -use crate::apdu::command::Expect; -use crate::apdu::{command::Command, response::RawResponse}; +use crate::apdu::command::{Command, Expect}; +use crate::apdu::response::RawResponse; +use crate::commands; use crate::{Error, StatusBytes}; /// "Maximum amount of bytes in a short APDU command or response" (from pcsc) diff --git a/openpgp-card/src/apdu/commands.rs b/openpgp-card/src/commands.rs similarity index 100% rename from openpgp-card/src/apdu/commands.rs rename to openpgp-card/src/commands.rs diff --git a/openpgp-card/src/keys.rs b/openpgp-card/src/keys.rs index 7880657..f098f65 100644 --- a/openpgp-card/src/keys.rs +++ b/openpgp-card/src/keys.rs @@ -10,8 +10,8 @@ use crate::algorithm::{ AlgorithmAttributes, AlgorithmInformation, Curve, EccAttributes, RsaAttributes, }; use crate::apdu::command::Command; -use crate::apdu::commands; use crate::card_do::{Fingerprint, KeyGenerationTime}; +use crate::commands; use crate::crypto_data::{ CardUploadableKey, EccKey, EccPub, EccType, PrivateKeyMaterial, PublicKeyMaterial, RSAKey, RSAPub, diff --git a/openpgp-card/src/lib.rs b/openpgp-card/src/lib.rs index 9d7ed7c..ca3c595 100644 --- a/openpgp-card/src/lib.rs +++ b/openpgp-card/src/lib.rs @@ -31,6 +31,7 @@ extern crate core; pub mod algorithm; pub(crate) mod apdu; pub mod card_do; +mod commands; pub mod crypto_data; mod errors; pub(crate) mod keys; @@ -45,7 +46,6 @@ use tags::{ShortTag, Tags}; use crate::algorithm::{AlgoSimple, AlgorithmAttributes, AlgorithmInformation}; use crate::apdu::command::Command; -use crate::apdu::commands; use crate::apdu::response::RawResponse; use crate::card_do::{ ApplicationRelatedData, CardholderRelatedData, Fingerprint, KeyGenerationTime, Lang,