Skip to content

Commit afe60d0

Browse files
committed
fix: resolve rebase error
1 parent f452beb commit afe60d0

File tree

5 files changed

+41
-19
lines changed

5 files changed

+41
-19
lines changed

Cargo.lock

Lines changed: 24 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mbedtls/Cargo.toml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ cfg-if = "1.0.0"
3232
tokio = { version = "0.3.4", optional = true }
3333

3434
[target.x86_64-fortanix-unknown-sgx.dependencies]
35-
rs-libc = "0.1.0"
35+
rs-libc = "0.2.0"
3636
chrono = "0.4"
3737

3838
[dependencies.mbedtls-sys-auto]
39-
version = "2.26.0"
39+
version = "2.28.0"
4040
default-features = false
4141
features = ["custom_printf", "trusted_cert_callback", "threading"]
4242
path = "../mbedtls-sys"
@@ -61,7 +61,7 @@ cc = "1.0"
6161
# Features are documented in the README
6262
default = ["std", "aesni", "time", "padlock"]
6363
std = ["byteorder/std", "mbedtls-sys-auto/std", "serde/std", "yasna"]
64-
debug = ["mbedtls-sys-auto/debug"]
64+
debug = []
6565
no_std_deps = ["spin", "serde/alloc"]
6666
force_aesni_support = ["mbedtls-sys-auto/custom_has_support", "mbedtls-sys-auto/aes_alt", "aesni"]
6767
mpi_force_c_code = ["mbedtls-sys-auto/mpi_force_c_code"]
@@ -118,11 +118,3 @@ required-features = ["std", "async-rt"]
118118
name = "async_session"
119119
path = "tests/async_session.rs"
120120
required-features = ["async-rt"]
121-
122-
123-
[package.metadata.fortanix-sgx]
124-
threads = 100
125-
heap-size = 0x40000000
126-
stack-size = 0x100000
127-
# The following are not processed by the EDP tools but are picked up by build-enclave.sh:
128-
#isvprodid = 66

mbedtls/src/pk/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ iy6KC991zzvaWY/Ys+q/84Afqa+0qJKQnPuy/7F5GkVdQA/lfbhi
12271227

12281228
#[test]
12291229
fn rsa_sign_verify_pkcs1v15() {
1230-
let pk =
1230+
let mut pk =
12311231
Pk::generate_rsa(&mut crate::test_support::rand::test_rng(), 2048, 0x10001).unwrap();
12321232
let data = b"SIGNATURE TEST SIGNATURE TEST SIGNATURE TEST SIGNATURE TEST SIGN";
12331233
let mut signature = vec![0u8; (pk.len() + 7) / 8];

mbedtls/src/ssl/context.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ use {
1414
std::sync::Arc,
1515
};
1616

17+
#[cfg(all(feature = "std", feature = "async"))]
18+
use {
19+
std::io::ErrorKind as IoErrorKind,
20+
std::marker::Unpin,
21+
std::pin::Pin,
22+
std::task::{Context as TaskContext, Poll},
23+
};
24+
1725
use mbedtls_sys::types::raw_types::{c_int, c_uchar, c_void};
1826
use mbedtls_sys::types::size_t;
1927
use mbedtls_sys::*;
@@ -260,12 +268,11 @@ impl<T> Context<T> {
260268
client_transport_id: None,
261269
}
262270
}
263-
}
264-
271+
265272
pub(crate) fn handle(&self) -> &::mbedtls_sys::ssl_context {
266273
self.inner.handle()
267274
}
268-
275+
269276
pub(crate) fn handle_mut(&mut self) -> &mut ::mbedtls_sys::ssl_context {
270277
self.inner.handle_mut()
271278
}
@@ -551,6 +558,7 @@ impl<T: IoCallback + Write> Write for Context<T> {
551558
Ok(())
552559
}
553560
}
561+
554562
//
555563
// Class exists only during SNI callback that is configured from Config.
556564
// SNI Callback must provide input whose lifetime exceeds the SNI closure to avoid memory corruptions.

mbedtls/tests/ssl_conf_ca_cb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ mod test {
5858
use std::thread;
5959
use crate::support::net::create_tcp_pair;
6060
use crate::support::keys;
61-
use mbedtls::x509::{Certificate};
61+
use mbedtls::x509::Certificate;
6262
use mbedtls::Error;
63-
use mbedtls::alloc::{List as MbedtlsList, Box as MbedtlsBox};
63+
use mbedtls::alloc::List as MbedtlsList;
6464

6565
// This callback should accept any valid self-signed certificate
6666
fn self_signed_ca_callback(child: &MbedtlsList<Certificate>) -> TlsResult<MbedtlsList<Certificate>> {

0 commit comments

Comments
 (0)