mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-13 17:44:48 +02:00
remove nested check for ssl->options.dtls
move cidSz declaration
This commit is contained in:
@@ -23598,6 +23598,10 @@ int BuildMessage(WOLFSSL* ssl, byte* output, int outSz, const byte* input,
|
|||||||
BuildMsgArgs lcl_args;
|
BuildMsgArgs lcl_args;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_DTLS_CID
|
||||||
|
byte cidSz = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
WOLFSSL_ENTER("BuildMessage");
|
WOLFSSL_ENTER("BuildMessage");
|
||||||
|
|
||||||
if (ssl == NULL) {
|
if (ssl == NULL) {
|
||||||
@@ -23730,15 +23734,12 @@ int BuildMessage(WOLFSSL* ssl, byte* output, int outSz, const byte* input,
|
|||||||
args->idx += DTLS_RECORD_EXTRA;
|
args->idx += DTLS_RECORD_EXTRA;
|
||||||
args->headerSz += DTLS_RECORD_EXTRA;
|
args->headerSz += DTLS_RECORD_EXTRA;
|
||||||
#ifdef WOLFSSL_DTLS_CID
|
#ifdef WOLFSSL_DTLS_CID
|
||||||
if (ssl->options.dtls) {
|
|
||||||
byte cidSz = 0;
|
|
||||||
if ((cidSz = DtlsGetCidTxSize(ssl)) > 0) {
|
if ((cidSz = DtlsGetCidTxSize(ssl)) > 0) {
|
||||||
args->sz += cidSz;
|
args->sz += cidSz;
|
||||||
args->idx += cidSz;
|
args->idx += cidSz;
|
||||||
args->headerSz += cidSz;
|
args->headerSz += cidSz;
|
||||||
args->sz++; /* real_type. no padding. */
|
args->sz++; /* real_type. no padding. */
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user