Merge pull request #4691 from JacobBarthelmeh/sessionExport

retain same size for exported session
pull/4699/head
David Garske 2021-12-23 14:03:11 -08:00 committed by GitHub
commit f950f24b1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -1191,6 +1191,11 @@ static int ExportOptions(WOLFSSL* ssl, byte* exp, word32 len, byte ver,
exp[idx++] = options->encThenMac;
exp[idx++] = options->startedETMRead;
exp[idx++] = options->startedETMWrite;
#else
exp[idx++] = 0;
exp[idx++] = 0;
exp[idx++] = 0;
exp[idx++] = 0;
#endif
}
@ -1369,6 +1374,11 @@ static int ImportOptions(WOLFSSL* ssl, const byte* exp, word32 len, byte ver,
options->encThenMac = exp[idx++];
options->startedETMRead = exp[idx++];
options->startedETMWrite = exp[idx++];
#else
idx++;
idx++;
idx++;
idx++;
#endif
}