Clippy lints
This commit is contained in:
parent
5a49b578f9
commit
6cfe340d2b
1 changed files with 5 additions and 6 deletions
|
@ -173,7 +173,7 @@ pub(crate) fn key_import(
|
||||||
let (algo, key_cmd) = match key.get_key()? {
|
let (algo, key_cmd) = match key.get_key()? {
|
||||||
PrivateKeyMaterial::R(rsa_key) => {
|
PrivateKeyMaterial::R(rsa_key) => {
|
||||||
let rsa_attrs =
|
let rsa_attrs =
|
||||||
determine_rsa_attrs(&ard, &rsa_key, key_type, algo_list)?;
|
determine_rsa_attrs(&ard, &*rsa_key, key_type, algo_list)?;
|
||||||
|
|
||||||
let key_cmd = rsa_key_import_cmd(key_type, rsa_key, &rsa_attrs)?;
|
let key_cmd = rsa_key_import_cmd(key_type, rsa_key, &rsa_attrs)?;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ pub(crate) fn key_import(
|
||||||
}
|
}
|
||||||
PrivateKeyMaterial::E(ecc_key) => {
|
PrivateKeyMaterial::E(ecc_key) => {
|
||||||
let ecc_attrs =
|
let ecc_attrs =
|
||||||
determine_ecc_attrs(&ecc_key, key_type, algo_list)?;
|
determine_ecc_attrs(&*ecc_key, key_type, algo_list)?;
|
||||||
|
|
||||||
let key_cmd = ecc_key_import_cmd(ecc_key, key_type)?;
|
let key_cmd = ecc_key_import_cmd(ecc_key, key_type)?;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ pub(crate) fn key_import(
|
||||||
/// result, we 'guess' the RsaAttrs setting.
|
/// result, we 'guess' the RsaAttrs setting.
|
||||||
fn determine_rsa_attrs(
|
fn determine_rsa_attrs(
|
||||||
ard: &ApplicationRelatedData,
|
ard: &ApplicationRelatedData,
|
||||||
rsa_key: &Box<dyn RSAKey>,
|
rsa_key: &dyn RSAKey,
|
||||||
key_type: KeyType,
|
key_type: KeyType,
|
||||||
algo_list: Option<AlgoInfo>,
|
algo_list: Option<AlgoInfo>,
|
||||||
) -> Result<RsaAttrs> {
|
) -> Result<RsaAttrs> {
|
||||||
|
@ -264,7 +264,7 @@ fn determine_rsa_attrs(
|
||||||
|
|
||||||
/// Derive EccAttrs from `ecc_key`, check if the OID is listed in algo_list.
|
/// Derive EccAttrs from `ecc_key`, check if the OID is listed in algo_list.
|
||||||
fn determine_ecc_attrs(
|
fn determine_ecc_attrs(
|
||||||
ecc_key: &Box<dyn EccKey>,
|
ecc_key: &dyn EccKey,
|
||||||
key_type: KeyType,
|
key_type: KeyType,
|
||||||
algo_list: Option<AlgoInfo>,
|
algo_list: Option<AlgoInfo>,
|
||||||
) -> Result<EccAttrs> {
|
) -> Result<EccAttrs> {
|
||||||
|
@ -276,8 +276,7 @@ fn determine_ecc_attrs(
|
||||||
return Err(anyhow!(
|
return Err(anyhow!(
|
||||||
"Oid {:?} unsupported according to algo_list",
|
"Oid {:?} unsupported according to algo_list",
|
||||||
oid
|
oid
|
||||||
)
|
));
|
||||||
.into());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue