Merge pull request #4585 from kareem-wolfssl/encryptMacFix

Fix building Import/ExportOptions with HAVE_ENCRYPT_THEN_MAC undefined.
This commit is contained in:
David Garske 2021-11-19 13:45:16 -08:00 committed by GitHub
commit 617668b9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1186,10 +1186,12 @@ static int ExportOptions(WOLFSSL* ssl, byte* exp, word32 len, byte ver,
exp[idx++] = options->asyncState;
if (type == WOLFSSL_EXPORT_TLS) {
#ifdef HAVE_ENCRYPT_THEN_MAC
exp[idx++] = options->disallowEncThenMac;
exp[idx++] = options->encThenMac;
exp[idx++] = options->startedETMRead;
exp[idx++] = options->startedETMWrite;
#endif
}
/* version of connection */
@ -1362,10 +1364,12 @@ static int ImportOptions(WOLFSSL* ssl, const byte* exp, word32 len, byte ver,
options->asyncState = exp[idx++];
if (type == WOLFSSL_EXPORT_TLS) {
#ifdef HAVE_ENCRYPT_THEN_MAC
options->disallowEncThenMac = exp[idx++];
options->encThenMac = exp[idx++];
options->startedETMRead = exp[idx++];
options->startedETMWrite = exp[idx++];
#endif
}
/* version of connection */