@@ -495,22 +495,25 @@ int Dtls13HashClientHello(const WOLFSSL* ssl, byte* hash, int* hashSz,
495495 wc_HashAlg hashCtx ;
496496 int type = wolfSSL_GetHmacType_ex (specs );
497497
498+ if (type < 0 )
499+ return type ;
500+
498501 header [0 ] = (byte )client_hello ;
499502 c32to24 (length , header + 1 );
500503
501- ret = wc_HashInit_ex (& hashCtx , type , ssl -> heap , ssl -> devId );
504+ ret = wc_HashInit_ex (& hashCtx , ( enum wc_HashType ) type , ssl -> heap , ssl -> devId );
502505 if (ret == 0 ) {
503- ret = wc_HashUpdate (& hashCtx , type , header , OPAQUE32_LEN );
506+ ret = wc_HashUpdate (& hashCtx , ( enum wc_HashType ) type , header , OPAQUE32_LEN );
504507 if (ret == 0 )
505- ret = wc_HashUpdate (& hashCtx , type , body , length );
508+ ret = wc_HashUpdate (& hashCtx , ( enum wc_HashType ) type , body , length );
506509 if (ret == 0 )
507- ret = wc_HashFinal (& hashCtx , type , hash );
510+ ret = wc_HashFinal (& hashCtx , ( enum wc_HashType ) type , hash );
508511 if (ret == 0 ) {
509- * hashSz = wc_HashGetDigestSize (type );
512+ * hashSz = wc_HashGetDigestSize (( enum wc_HashType ) type );
510513 if (* hashSz < 0 )
511514 ret = * hashSz ;
512515 }
513- wc_HashFree (& hashCtx , type );
516+ wc_HashFree (& hashCtx , ( enum wc_HashType ) type );
514517 }
515518 return ret ;
516519}
@@ -568,9 +571,6 @@ static int Dtls13SendFragment(WOLFSSL* ssl, byte* output, word16 output_size,
568571 else {
569572 msg = output + recordHeaderLength ;
570573
571- if (length <= recordHeaderLength )
572- return BUFFER_ERROR ;
573-
574574 if (hashOutput ) {
575575 ret = Dtls13HashHandshake (ssl , msg , recordLength );
576576 if (ret != 0 )
@@ -1713,7 +1713,7 @@ static int _Dtls13HandshakeRecv(WOLFSSL* ssl, byte* input, word32 size,
17131713 isFirst = fragOff == 0 ;
17141714 isComplete = isFirst && fragLength == messageLength ;
17151715
1716- if (!isComplete && !Dtls13AcceptFragmented (ssl , handshakeType )) {
1716+ if (!isComplete && !Dtls13AcceptFragmented (ssl , ( enum HandShakeType ) handshakeType )) {
17171717#ifdef WOLFSSL_DTLS_CH_FRAG
17181718 byte tls13 = 0 ;
17191719 /* check if the first CH fragment contains a valid cookie */
0 commit comments