dtls13: introduce wolfSSL_dtls_13_has_pending_msg() API

This commit is contained in:
Marco Oliverio
2022-05-20 10:00:23 +02:00
committed by David Garske
parent e2abdf23a7
commit ca05ad2dc0
3 changed files with 15 additions and 0 deletions

View File

@ -14085,3 +14085,12 @@ int wolfSSL_RSA_sign_generic_padding(int type, const unsigned char* m,
unsigned int mLen, unsigned char* sigRet,
unsigned int* sigLen, WOLFSSL_RSA* rsa,
int flag, int padding);
/*!
\brief checks if DTLSv1.3 stack has some messages sent but not yet acknowledged
by the other peer
\return 1 if there are pending messages, 0 otherwise
\param ssl A WOLFSSL object pointer
*/
int wolfSSL_dtls13_has_pending_msg(WOLFSSL *ssl);

View File

@ -2420,4 +2420,9 @@ int Dtls13RtxProcessingCertificate(WOLFSSL* ssl, byte* input, word32 inputSize)
return 0;
}
int wolfSSL_dtls13_has_pending_msg(WOLFSSL* ssl)
{
return ssl->dtls13Rtx.rtxRecords != NULL;
}
#endif /* WOLFSSL_DTLS13 */

View File

@ -869,6 +869,7 @@ WOLFSSL_API WOLFSSL_METHOD *wolfSSLv23_client_method_ex(void* heap);
#ifdef WOLFSSL_DTLS13
WOLFSSL_API WOLFSSL_METHOD *wolfDTLSv1_3_client_method_ex(void* heap);
WOLFSSL_API WOLFSSL_METHOD *wolfDTLSv1_3_server_method_ex(void* heap);
WOLFSSL_API int wolfSSL_dtls13_has_pending_msg(WOLFSSL *ssl);
#endif
#endif