@@ -2,10 +2,11 @@ use anyhow::Context;
2
2
use camino:: Utf8PathBuf ;
3
3
use certificate:: CsrTemplate ;
4
4
use clap:: ValueEnum ;
5
- use elliptic_curve:: sec1:: { EncodedPoint , FromEncodedPoint } ;
5
+ use elliptic_curve:: sec1:: EncodedPoint ;
6
+ use elliptic_curve:: sec1:: FromEncodedPoint ;
6
7
use tedge_config:: TEdgeConfig ;
7
- use tedge_p11_server:: pkcs11:: { CreateKeyParams , KeyTypeParams } ;
8
- use tedge_p11_server:: CryptokiConfig ;
8
+ use tedge_p11_server:: pkcs11:: CreateKeyParams ;
9
+ use tedge_p11_server:: pkcs11 :: KeyTypeParams ;
9
10
10
11
use crate :: cli:: common:: Cloud ;
11
12
use crate :: command:: Command ;
@@ -76,8 +77,8 @@ impl Command for CreateKeyCmd {
76
77
. into_option ( )
77
78
. context ( "Failed to create EC pubkey from EncodedPoint" ) ?;
78
79
let der = pubkey. to_sec1_bytes ( ) ;
79
- let pubkey_pem = pem :: Pem :: new ( "PUBLIC KEY" , der ) ;
80
- pubkey_pem
80
+
81
+ pem :: Pem :: new ( "PUBLIC KEY" , der )
81
82
}
82
83
384 => {
83
84
let ec_point = EncodedPoint :: < p384:: NistP384 > :: from_bytes ( & pubkey_der[ 2 ..] )
@@ -89,8 +90,8 @@ impl Command for CreateKeyCmd {
89
90
. into_option ( )
90
91
. context ( "Failed to create EC pubkey from EncodedPoint" ) ?;
91
92
let der = pubkey. to_sec1_bytes ( ) ;
92
- let pubkey_pem = pem :: Pem :: new ( "PUBLIC KEY" , der ) ;
93
- pubkey_pem
93
+
94
+ pem :: Pem :: new ( "PUBLIC KEY" , der )
94
95
}
95
96
_ => return Err ( anyhow:: anyhow!( "aaaa" ) . into ( ) ) ,
96
97
} ;
0 commit comments