diff --git a/libctru/include/3ds/services/sslc.h b/libctru/include/3ds/services/sslc.h index 2aa0705..aa9b2f0 100644 --- a/libctru/include/3ds/services/sslc.h +++ b/libctru/include/3ds/services/sslc.h @@ -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. diff --git a/libctru/source/services/sslc.c b/libctru/source/services/sslc.c index 687952f..bb2348f 100644 --- a/libctru/source/services/sslc.c +++ b/libctru/source/services/sslc.c @@ -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;