src/wolfSSL/src/internal.c
static void AddHeaders(byte* output, word32 length, byte type, WOLFSSL* ssl)
{
    word32 lengthAdj = HANDSHAKE_HEADER_SZ;
    word32 outputAdj = RECORD_HEADER_SZ;

#ifdef WOLFSSL_DTLS
    if (ssl->options.dtls) {
        lengthAdj += DTLS_HANDSHAKE_EXTRA;
        outputAdj += DTLS_RECORD_EXTRA;
    }
#endif

    AddRecordHeader(output, length + lengthAdj, handshake, ssl);
    AddHandShakeHeader(output + outputAdj, length, 0, length, type, ssl);
}
/* add both headers for handshake message */
add both headers for handshake message
add both headers for handshake message
static void AddHeaders(byte* output, word32 length, byte type, WOLFSSL* ssl)
{
    word32 lengthAdj = HANDSHAKE_HEADER_SZ;
    word32 outputAdj = RECORD_HEADER_SZ;
#ifdef WOLFSSL_DTLS
    if (ssl->options.dtls) {
        lengthAdj += DTLS_HANDSHAKE_EXTRA;
        outputAdj += DTLS_RECORD_EXTRA;
    }
#endif
    AddRecordHeader(output, length + lengthAdj, handshake, ssl);
    AddHandShakeHeader(output + outputAdj, length, 0, length, type, ssl);
}
static void AddHeaders ( byte * output , word32 length , byte type , WOLFSSL * ssl ) { word32 lengthAdj = HANDSHAKE_HEADER_SZ ; word32 outputAdj = RECORD_HEADER_SZ ; #ifdef WOLFSSL_DTLS if ( ssl -> options . dtls ) { lengthAdj += DTLS_HANDSHAKE_EXTRA ; outputAdj += DTLS_RECORD_EXTRA ; } #endif AddRecordHeader ( output , length + lengthAdj , handshake , ssl ) ; AddHandShakeHeader ( output + outputAdj , length , 0 , length , type , ssl ) ; }
add both headers for handshake message
add both headers for handshake message