Skip to content

Commit

Permalink
Reduce the overhead of of CreateCertificateFromCsr buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasKoch committed Jul 19, 2024
1 parent d6d4af3 commit f424608
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/provisioning/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ use embedded_mqtt::{
SubscribeTopic, Subscription,
};
use futures::StreamExt;
use serde::Serialize;
use serde::{de::DeserializeOwned, Deserialize};
use serde::{de::DeserializeOwned, Deserialize, Serialize};

pub use error::Error;

use self::data_types::CreateCertificateFromCsrRequest;
use self::{
data_types::{
CreateCertificateFromCsrRequest, CreateCertificateFromCsrResponse,
CreateKeysAndCertificateResponse, ErrorResponse, RegisterThingRequest,
RegisterThingResponse,
},
Expand Down Expand Up @@ -137,8 +136,6 @@ impl FleetProvisioner {
where
C: DeserializeOwned,
{
use crate::provisioning::data_types::CreateCertificateFromCsrResponse;

let mut create_subscription = Self::begin(mqtt, csr, payload_format).await?;

let mut message = create_subscription
Expand Down Expand Up @@ -326,7 +323,7 @@ impl FleetProvisioner {
.map_err(|_| EncodingError::BufferSize)?,
})
},
1024,
csr.len() + 32,
);

mqtt.publish(Publish {
Expand Down

0 comments on commit f424608

Please sign in to comment.