]> Chaos Git - corbenik/ctrulib.git/commitdiff
Switched sslcContextGetStrings to sslcContextGetProtocolCipher since it's documented...
authoryellows8 <yellows8@users.noreply.github.com>
Wed, 30 Mar 2016 20:04:17 +0000 (16:04 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Wed, 30 Mar 2016 20:04:17 +0000 (16:04 -0400)
libctru/include/3ds/services/sslc.h
libctru/source/services/sslc.c

index 2aa0705ca57f696513a999348a501d60c4415c78..aa9b2f0653ae43afa9c1dadcac41c43d89e36b91 100644 (file)
@@ -182,14 +182,14 @@ Result sslcContextSetHandle8(sslcContext *context, u32 handle);
 Result sslcContextClearOpt(sslcContext *context, u32 bitmask);
 
 /*
- * @brief This copies two strings from context state to the specified output buffers. Each string is only copied if it was successfully loaded. The maxsizes include the nul-terminator. TODO: Update this with what these strings actually are.
+ * @brief This copies two strings from context state to the specified output buffers. Each string is only copied if it was successfully loaded. The maxsizes include the nul-terminator. This can only be used if sslcStartConnection() was already used successfully.
  * @param context sslc context.
- * @param str0 Output buffer for str0.
- * @param str0_maxsize Max size of the str0 output buffer.
- * @param str0 Output buffer for str1.
- * @param str0_maxsize Max size of the str1 output buffer.
+ * @param outprotocols Output buffer for a string containing all protocol versions supported by SSL-module.
+ * @param outprotocols_maxsize Max size of the above output buffer.
+ * @param outcipher Output buffer for a string containing the cipher suite currently being used.
+ * @param outcipher_maxsize Max size of the above output buffer.
  */
-Result sslcContextGetStrings(sslcContext *context, char *str0, u32 str0_maxsize, char *str1, u32 str1_maxsize);
+Result sslcContextGetProtocolCipher(sslcContext *context, char *outprotocols, u32 outprotocols_maxsize, char *outcipher, u32 outcipher_maxsize);
 
 /*
  * @brief This loads an u32 from the specified context state. This needs updated once it's known what this field is for.
index 687952fcf6002e91de3b860f830e6ea2f0d4d315..bb2348f87a263ea0c44fcbfe840ada5a2fe709ec 100644 (file)
@@ -312,18 +312,18 @@ static Result sslcipc_ContextSetValue(sslcContext *context, u32 type, u32 value)
        return cmdbuf[1];
 }
 
-Result sslcContextGetStrings(sslcContext *context, char *str0, u32 str0_maxsize, char *str1, u32 str1_maxsize)
+Result sslcContextGetProtocolCipher(sslcContext *context, char *outprotocols, u32 outprotocols_maxsize, char *outcipher, u32 outcipher_maxsize)
 {
        u32* cmdbuf=getThreadCommandBuffer();
 
        cmdbuf[0]=IPC_MakeHeader(0x1C,3,4); // 0x1C00C4
        cmdbuf[1]=context->sslchandle;
-       cmdbuf[2]=str0_maxsize;
-       cmdbuf[3]=str1_maxsize;
-       cmdbuf[4]=IPC_Desc_Buffer(str0_maxsize, IPC_BUFFER_W);
-       cmdbuf[5]=(u32)str0;
-       cmdbuf[6]=IPC_Desc_Buffer(str1_maxsize, IPC_BUFFER_W);
-       cmdbuf[7]=(u32)str1;
+       cmdbuf[2]=outprotocols_maxsize;
+       cmdbuf[3]=outcipher_maxsize;
+       cmdbuf[4]=IPC_Desc_Buffer(outprotocols_maxsize, IPC_BUFFER_W);
+       cmdbuf[5]=(u32)outprotocols;
+       cmdbuf[6]=IPC_Desc_Buffer(outcipher_maxsize, IPC_BUFFER_W);
+       cmdbuf[7]=(u32)outcipher;
 
        Result ret=0;
        if(R_FAILED(ret=svcSendSyncRequest(context->servhandle)))return ret;