File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4850,7 +4850,7 @@ int wolfSSL_GetVersion(const WOLFSSL* ssl)
48504850 if (ssl == NULL)
48514851 return BAD_FUNC_ARG;
48524852
4853- if (ssl->version.major == SSLv3_MAJOR || ssl->version.major == DTLS_MAJOR ) {
4853+ if (ssl->version.major == SSLv3_MAJOR) {
48544854 switch (ssl->version.minor) {
48554855 case SSLv3_MINOR :
48564856 return WOLFSSL_SSLV3;
@@ -4862,6 +4862,13 @@ int wolfSSL_GetVersion(const WOLFSSL* ssl)
48624862 return WOLFSSL_TLSV1_2;
48634863 case TLSv1_3_MINOR :
48644864 return WOLFSSL_TLSV1_3;
4865+ default:
4866+ break;
4867+ }
4868+ }
4869+ #ifdef WOLFSSL_DTLS
4870+ if (ssl->version.major == DTLS_MAJOR) {
4871+ switch (ssl->version.minor) {
48654872 case DTLS_MINOR :
48664873 return WOLFSSL_DTLSV1;
48674874 case DTLSv1_2_MINOR :
@@ -4872,6 +4879,7 @@ int wolfSSL_GetVersion(const WOLFSSL* ssl)
48724879 break;
48734880 }
48744881 }
4882+ #endif /* WOLFSSL_DTLS */
48754883
48764884 return VERSION_ERROR;
48774885}
Original file line number Diff line number Diff line change @@ -913,8 +913,8 @@ static int Hmac_OuterHash(Hmac* hmac, unsigned char* mac)
913913 (word32 )digestSz );
914914 if (ret == 0 )
915915 ret = wc_HashFinal (& hash , hashType , mac );
916+ wc_HashFree (& hash , hashType );
916917 }
917- wc_HashFree (& hash , hashType );
918918
919919 return ret ;
920920}
You can’t perform that action at this time.
0 commit comments