-
-
Save Subv/47f09665b12c0ec936c327ac94df3082 to your computer and use it in GitHub Desktop.
citra HTTPC context draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Proxy { | |
std::string url; | |
std::string username; | |
std::string password; | |
u16 port; | |
}; | |
struct BasicAuth { | |
std::string username; | |
std::string password; | |
}; | |
struct RequestHeader { | |
std::string name; | |
std::string value; | |
}; | |
struct PostData { | |
// TODO(Subv): Support Binary and Raw POST elements. | |
std::string name; | |
std::string value; | |
}; | |
struct ClientCertContext { | |
u32 handle; | |
std::vector<u8> certificate; | |
std::vector<u8> private_key; | |
}; | |
struct RootCertChain { | |
struct RootCACert { | |
u32 handle; | |
std::vector<u8> certificate; | |
}; | |
u32 handle; | |
std::vector<RootCACert> certificates; | |
}; | |
struct SSLConfig { | |
static constexpr SSLConfig default_config{}; | |
u32 options; | |
std::weak_ptr<ClientCertContext> client_cert_ctx; | |
std::weak_ptr<RootCertChain> root_ca_chain; | |
}; | |
struct Context { | |
std::string url; | |
RequestMethod method; | |
RequestState state; | |
boost::optional<Proxy> proxy; | |
boost::optional<BasicAuth> basic_auth; | |
SSLConfig ssl_config = SSLConfig::default_config; | |
u32 socket_buffer_size; | |
std::vector<RequestHeader> headers; | |
std::vector<PostData> post_data; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment