Cleanup field naming in EccAttrs: t->ecc_type.
This commit is contained in:
parent
a0d92d2dc4
commit
99be1fb7da
3 changed files with 9 additions and 5 deletions
|
@ -573,7 +573,7 @@ impl CardApp {
|
||||||
|
|
||||||
let data = match algo {
|
let data = match algo {
|
||||||
Algo::Rsa(rsa) => Self::rsa_algo_attrs(rsa)?,
|
Algo::Rsa(rsa) => Self::rsa_algo_attrs(rsa)?,
|
||||||
Algo::Ecc(ecc) => Self::ecc_algo_attrs(&ecc.oid, ecc.t),
|
Algo::Ecc(ecc) => Self::ecc_algo_attrs(&ecc.oid, ecc.ecc_type),
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ pub(crate) fn upload_key(
|
||||||
// }
|
// }
|
||||||
|
|
||||||
let algo = Algo::Ecc(EccAttrs {
|
let algo = Algo::Ecc(EccAttrs {
|
||||||
t: ecc_key.get_type(),
|
ecc_type: ecc_key.get_type(),
|
||||||
oid: ecc_key.get_oid().to_vec(),
|
oid: ecc_key.get_oid().to_vec(),
|
||||||
import_format: None,
|
import_format: None,
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,15 +27,19 @@ pub struct RsaAttrs {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub struct EccAttrs {
|
pub struct EccAttrs {
|
||||||
pub t: EccType,
|
pub ecc_type: EccType,
|
||||||
pub oid: Vec<u8>,
|
pub oid: Vec<u8>,
|
||||||
pub import_format: Option<u8>,
|
pub import_format: Option<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EccAttrs {
|
impl EccAttrs {
|
||||||
pub fn new(t: EccType, curve: Curve, import_format: Option<u8>) -> Self {
|
pub fn new(
|
||||||
|
ecc_type: EccType,
|
||||||
|
curve: Curve,
|
||||||
|
import_format: Option<u8>,
|
||||||
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
t,
|
ecc_type,
|
||||||
oid: curve.oid().to_vec(),
|
oid: curve.oid().to_vec(),
|
||||||
import_format,
|
import_format,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue