@@ -10745,7 +10745,7 @@ static int SendHandshakeMsg(WOLFSSL* ssl, byte* input, word32 inputSz,
1074510745 inputSz += HANDSHAKE_HEADER_SZ;
1074610746 rHdrSz = RECORD_HEADER_SZ;
1074710747 }
10748- maxFrag = wolfSSL_GetMaxPlaintextSize (ssl);
10748+ maxFrag = wolfssl_i_GetMaxPlaintextSize (ssl);
1074910749#ifdef WOLFSSL_DTLS
1075010750 if (ssl->options.dtls) {
1075110751 /* In DTLS the handshake header is per fragment */
@@ -24800,7 +24800,7 @@ int SendCertificate(WOLFSSL* ssl)
2480024800 length -= (ssl->fragOffset + headerSz);
2480124801
2480224802
24803- maxFragment = (word32)wolfSSL_GetMaxPlaintextSize (ssl);
24803+ maxFragment = (word32)wolfssl_i_GetMaxPlaintextSize (ssl);
2480424804 if (ssl->options.dtls)
2480524805 maxFragment -= DTLS_HANDSHAKE_HEADER_SZ;
2480624806 else
@@ -25961,7 +25961,7 @@ int SendData(WOLFSSL* ssl, const void* data, size_t sz)
2596125961 if (sent == (word32)sz) break;
2596225962
2596325963 buffSz = (word32)sz - sent;
25964- outputSz = wolfSSL_GetRecordSize (ssl, (word32)buffSz, 1);
25964+ outputSz = wolfssl_i_GetRecordSize (ssl, (word32)buffSz, 1);
2596525965#if defined(WOLFSSL_DTLS)
2596625966 if (ssl->options.dtls) {
2596725967#if defined(WOLFSSL_DTLS_MTU)
@@ -25972,8 +25972,8 @@ int SendData(WOLFSSL* ssl, const void* data, size_t sz)
2597225972 if (outputSz > mtu) {
2597325973#if defined(WOLFSSL_NO_DTLS_SIZE_CHECK)
2597425974 /* split instead of error out */
25975- buffSz = min(buffSz, wolfSSL_GetMaxPlaintextSize (ssl));
25976- outputSz = wolfSSL_GetRecordSize (ssl, (word32)buffSz, 1);
25975+ buffSz = min(buffSz, wolfssl_i_GetMaxPlaintextSize (ssl));
25976+ outputSz = wolfssl_i_GetRecordSize (ssl, (word32)buffSz, 1);
2597725977#else
2597825978 error = DTLS_SIZE_ERROR;
2597925979 ssl->error = error;
@@ -41808,7 +41808,7 @@ int wolfSSL_AsyncPush(WOLFSSL* ssl, WC_ASYNC_DEV* asyncDev)
4180841808 * @param isEncrypted 1 if encryption is on, 0 if not
4180941809 * @return Record size for sending payloadSz of data
4181041810 */
41811- int wolfSSL_GetRecordSize (WOLFSSL *ssl, int payloadSz, int isEncrypted)
41811+ int wolfssl_i_GetRecordSize (WOLFSSL *ssl, int payloadSz, int isEncrypted)
4181241812{
4181341813 int recordSz;
4181441814
@@ -41837,11 +41837,11 @@ int wolfSSL_GetRecordSize(WOLFSSL *ssl, int payloadSz, int isEncrypted)
4183741837}
4183841838#endif
4183941839
41840- /** Return the maximum plaintext size for the current MTU.
41840+ /** Return the maximum plaintext size for the current Max Fragment and MTU.
4184141841 * @param ssl WOLFSSL object containing ciphersuite information.
4184241842 * @return Max plaintext size for current MTU
4184341843 */
41844- int wolfSSL_GetMaxPlaintextSize (WOLFSSL *ssl)
41844+ int wolfssl_i_GetMaxPlaintextSize (WOLFSSL *ssl)
4184541845{
4184641846 int maxFrag;
4184741847
@@ -41855,8 +41855,6 @@ int wolfSSL_GetMaxPlaintextSize(WOLFSSL *ssl)
4185541855 int recordSz;
4185641856 int mtu;
4185741857
41858- recordSz = wolfSSL_GetRecordSize(ssl, maxFrag, IsEncryptionOn(ssl, 1));
41859-
4186041858#if defined(WOLFSSL_DTLS_MTU)
4186141859 mtu = ssl->dtlsMtuSz;
4186241860#else
0 commit comments