You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2020/04/08 11:45:46 UTC
[GitHub] [incubator-teaclave-sgx-sdk] czzmmc opened a new issue #221:
Segmentation fault during https request
czzmmc opened a new issue #221: Segmentation fault during https request
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/221
My code is like below. I am trying to send https request from enclave. I think that should have worked, but it just gives me segmentation fault error. How should I fix it?
#[no_mangle]
pub extern "C" fn send_http_request(hostname: *const c_char) -> sgx_status_t {
println!("1");
let hostname = unsafe { CStr::from_ptr(hostname).to_str() };
let hostname = hostname.expect("Failed to recover hostname");
println!("hostname: {:?}", hostname);
let mut writer = Vec::new(); //container for body of a response
let res = request::get("https://www.baidu.com", &mut writer).unwrap();
println!("Status: {} {}", res.status_code(), res.reason());
println!("{:?}", res);
sgx_status_t::SGX_SUCCESS
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org
[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #221:
Segmentation fault during https request
Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #221: Segmentation fault during https request
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/221#issuecomment-611221699
duplicate of #220
You may refer to [http_req](../tree/master/samplecode/http_req) sample.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org
[GitHub] [incubator-teaclave-sgx-sdk] dingelish closed issue #221:
Segmentation fault during https request
Posted by GitBox <gi...@apache.org>.
dingelish closed issue #221: Segmentation fault during https request
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/221
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org