Skip to content

Commit

Permalink
Fix CI for ESP IDF master
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jan 1, 2025
1 parent 127de02 commit e4a69a7
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,25 @@ mod esptls {
rcfg.keep_alive_cfg = &mut raw_kac as *mut _;
}

let mut raw_psk: sys::psk_key_hint;
if let Some(psk) = &self.psk_hint_key {
raw_psk = sys::psk_key_hint {
key: psk.key.as_ptr(),
key_size: psk.key.len(),
hint: psk.hint.as_ptr(),
};
rcfg.psk_hint_key = &mut raw_psk as *mut _;
#[cfg(any(
esp_idf_esp_tls_psk_verification,
esp_idf_version_major = "4",
esp_idf_version = "5.0",
esp_idf_version = "5.1",
esp_idf_version = "5.2",
esp_idf_version = "5.3",
esp_idf_version = "5.4",
))]
{
let mut raw_psk: sys::psk_key_hint;
if let Some(psk) = &self.psk_hint_key {
raw_psk = sys::psk_key_hint {
key: psk.key.as_ptr(),
key_size: psk.key.len(),
hint: psk.hint.as_ptr(),
};
rcfg.psk_hint_key = &mut raw_psk as *mut _;
}
}

#[cfg(esp_idf_mbedtls_certificate_bundle)]
Expand Down

0 comments on commit e4a69a7

Please sign in to comment.