parent
0c1e656a2b
commit
353f7af759
@ -129,6 +129,14 @@ Result httpcGetResponseHeader(httpcContext *context, char* name, char* value, u3
|
|||||||
*/
|
*/
|
||||||
Result httpcAddTrustedRootCA(httpcContext *context, u8 *cert, u32 certsize);
|
Result httpcAddTrustedRootCA(httpcContext *context, u8 *cert, u32 certsize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets SSL options for the context.
|
||||||
|
* The HTTPC SSL option bits are the same as those defined in sslc.h
|
||||||
|
* @param contect Context to set flags on.
|
||||||
|
* @param options SSL option flags.
|
||||||
|
*/
|
||||||
|
Result httpcSetSSLOpt(httpcContext *context, u32 options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Downloads data from the HTTP context into a buffer.
|
* @brief Downloads data from the HTTP context into a buffer.
|
||||||
* The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang.
|
* The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang.
|
||||||
@ -269,3 +277,11 @@ Result HTTPC_GetResponseStatusCode(Handle handle, Handle contextHandle, u32* out
|
|||||||
*/
|
*/
|
||||||
Result HTTPC_AddTrustedRootCA(Handle handle, Handle contextHandle, u8 *cert, u32 certsize);
|
Result HTTPC_AddTrustedRootCA(Handle handle, Handle contextHandle, u8 *cert, u32 certsize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets SSL options for the context.
|
||||||
|
* @param handle HTTPC service handle to use.
|
||||||
|
* @param contextHandle HTTP context handle to use.
|
||||||
|
* @param options SSL option flags.
|
||||||
|
*/
|
||||||
|
Result HTTPC_SetSSLOpt(Handle handle, Handle contextHandle, u32 options);
|
||||||
|
|
||||||
|
@ -169,6 +169,11 @@ Result httpcAddTrustedRootCA(httpcContext *context, u8 *cert, u32 certsize)
|
|||||||
return HTTPC_AddTrustedRootCA(context->servhandle, context->httphandle, cert, certsize);
|
return HTTPC_AddTrustedRootCA(context->servhandle, context->httphandle, cert, certsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result httpcSetSSLOpt(httpcContext *context, u32 options)
|
||||||
|
{
|
||||||
|
return HTTPC_SetSSLOpt(context->servhandle, context->httphandle, options);
|
||||||
|
}
|
||||||
|
|
||||||
Result httpcDownloadData(httpcContext *context, u8* buffer, u32 size, u32 *downloadedsize)
|
Result httpcDownloadData(httpcContext *context, u8* buffer, u32 size, u32 *downloadedsize)
|
||||||
{
|
{
|
||||||
Result ret=0;
|
Result ret=0;
|
||||||
@ -460,3 +465,16 @@ Result HTTPC_AddTrustedRootCA(Handle handle, Handle contextHandle, u8 *cert, u32
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result HTTPC_SetSSLOpt(Handle handle, Handle contextHandle, u32 options)
|
||||||
|
{
|
||||||
|
u32* cmdbuf=getThreadCommandBuffer();
|
||||||
|
|
||||||
|
cmdbuf[0]=IPC_MakeHeader(0x2B,2,0); // 0x2B0080
|
||||||
|
cmdbuf[1]=contextHandle;
|
||||||
|
cmdbuf[2]=options;
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if(R_FAILED(ret=svcSendSyncRequest(handle)))return ret;
|
||||||
|
|
||||||
|
return cmdbuf[1];
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user