Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Taowyoo committed Dec 21, 2022
1 parent 5b8a29a commit 0251431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mbedtls/src/rng/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub unsafe extern "C" fn mbedtls_psa_external_get_random(
_user_data: *mut mbedtls_sys::types::raw_types::c_void,
data: *mut c_uchar,
len: size_t,
olen: * mut size_t) -> mbedtls_sys::types::int32_t {
olen = &mut len as * mut size_t;
_olen: * mut size_t) -> mbedtls_sys::types::int32_t {
_olen = &mut len as * mut size_t;
self::rdrand::rng_call(data, len)
}
10 changes: 5 additions & 5 deletions mbedtls/tests/hyper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ mod tests {
let ssl = MbedSSLClient::new(Arc::new(config), true);

let client1 = hyper::Client::with_connector(Pool::with_connector(Default::default(), HttpsConnector::new(ssl.clone())));
request_with_retry(client1.into(), "https://www.google.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);
request_with_retry(client1.into(), "https://cloud.google.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);

let client2 = hyper::Client::with_connector(Pool::with_connector(Default::default(), HttpsConnector::new(ssl.clone())));
request_with_retry(client2.into(), "https://www.google.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);
request_with_retry(client2.into(), "https://www.youtube.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);

let client3 = hyper::Client::with_connector(Pool::with_connector(Default::default(), HttpsConnector::new(ssl.clone())));
request_with_retry(client3.into(), "https://www.google.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);
request_with_retry(client3.into(), "https://www.android.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);
}

#[test_case(0, test_name="test_hyper_multithread_tls1_2")]
Expand Down Expand Up @@ -303,11 +303,11 @@ mod tests {
let clone1 = client.clone();
let clone2 = client.clone();
let t1 = std::thread::spawn(move || {
request_with_retry(clone1, "https://www.google.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);
request_with_retry(clone1, "https://www.android.com/", None, hyper::status::StatusCode::Ok, OUTBOUND_REQUEST_RETRY_TIMES);
});

let t2 = std::thread::spawn(move || {
let response = clone2.post("https://google.com").body("foo=bar").send().unwrap();
let response = clone2.post("https://www.google.com").body("foo=bar").send().unwrap();
assert_eq!(response.status, hyper::status::StatusCode::MethodNotAllowed);
});

Expand Down

0 comments on commit 0251431

Please sign in to comment.