HTTP_C: Implement SetClientCertContext, GetSSLError, BeginRequest, BeginRequestAsync (#4753)

* HTTP_C: Implement SetClientCertContext and GetSSLError; Stubbed BeginRequest and BeginRequestAsync

* HTTP_C: Move logs to beginning of function calls
This commit is contained in:
Ben
2019-04-23 18:35:28 +02:00
committed by GitHub
parent 2706a4d658
commit 624271696e
2 changed files with 253 additions and 31 deletions

View File

@@ -193,6 +193,24 @@ private:
*/
void InitializeConnectionSession(Kernel::HLERequestContext& ctx);
/**
* HTTP_C::BeginRequest service function
* Inputs:
* 1 : Context handle
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void BeginRequest(Kernel::HLERequestContext& ctx);
/**
* HTTP_C::BeginRequestAsync service function
* Inputs:
* 1 : Context handle
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void BeginRequestAsync(Kernel::HLERequestContext& ctx);
/**
* HTTP_C::AddRequestHeader service function
* Inputs:
@@ -223,6 +241,27 @@ private:
*/
void AddPostDataAscii(Kernel::HLERequestContext& ctx);
/**
* HTTP_C::SetClientCertContext service function
* Inputs:
* 1 : Context handle
* 2 : Cert context handle
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetClientCertContext(Kernel::HLERequestContext& ctx);
/**
* HTTP_C::GetSSLError service function
* Inputs:
* 1 : Context handle
* 2 : Unknown
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : SSL Error code
*/
void GetSSLError(Kernel::HLERequestContext& ctx);
/**
* HTTP_C::OpenClientCertContext service function
* Inputs:
@@ -280,7 +319,7 @@ private:
std::unordered_map<Context::Handle, Context> contexts;
/// Global list of ClientCert contexts currently opened.
std::unordered_map<ClientCertContext::Handle, ClientCertContext> client_certs;
std::unordered_map<ClientCertContext::Handle, std::shared_ptr<ClientCertContext>> client_certs;
struct {
std::vector<u8> certificate;