@@ -35,7 +35,7 @@ use base64::{Engine as _, engine::general_purpose};
3535use reqwest:: { Client , ClientBuilder } ;
3636
3737use crate :: { consts, log} ;
38- use crypt:: { PUBLIC_KEY_SIZE , SECRET_KEY_SIZE , Ticket , generate_key_pair} ;
38+ use crypt:: { PUBLIC_KEY_SIZE , PRIVATE_KEY_SIZE , Ticket , generate_key_pair} ;
3939
4040pub mod types;
4141
@@ -55,7 +55,7 @@ pub struct UdsBrokerApi {
5555 broker_url : String ,
5656 hostname : String ,
5757 public_key : [ u8 ; PUBLIC_KEY_SIZE ] ,
58- private_key : [ u8 ; SECRET_KEY_SIZE ] ,
58+ private_key : [ u8 ; PRIVATE_KEY_SIZE ] ,
5959}
6060
6161impl UdsBrokerApi {
@@ -76,7 +76,6 @@ impl UdsBrokerApi {
7676 builder = builder. no_proxy ( ) ;
7777 }
7878
79-
8079 // Note: unwraps are intentinonal here, if we cannot build the client, we want to
8180 // abort early.
8281
@@ -96,7 +95,11 @@ impl UdsBrokerApi {
9695
9796 // Only for tests
9897 #[ cfg( test) ]
99- pub fn with_keys ( self , private_key : [ u8 ; SECRET_KEY_SIZE ] , public_key : [ u8 ; PUBLIC_KEY_SIZE ] ) -> Self {
98+ pub fn with_keys (
99+ self ,
100+ private_key : [ u8 ; PRIVATE_KEY_SIZE ] ,
101+ public_key : [ u8 ; PUBLIC_KEY_SIZE ] ,
102+ ) -> Self {
100103 Self {
101104 public_key,
102105 private_key,
@@ -175,11 +178,6 @@ impl BrokerApi for UdsBrokerApi {
175178 percent : 0 ,
176179 } )
177180 } ) ?
178-
179- // response
180- // .json::<types::BrokerResponse<types::Script>>()
181- // .await?
182- // .into_result()
183181 }
184182
185183 async fn send_log ( & self , log_str : String ) -> Result < ( ) > {
0 commit comments