Take into account a new flag in the DTLS state export and import.

This commit is contained in:
John Safranek
2021-05-10 09:33:38 -07:00
parent e247161b2e
commit a608b083b4
2 changed files with 3 additions and 1 deletions

View File

@ -957,6 +957,7 @@ static int dtls_export_new(WOLFSSL* ssl, byte* exp, word32 len, byte ver)
}
#endif
#else
exp[idx++] = 0;
exp[idx++] = 0;
exp[idx++] = 0;
if (ver > DTLS_EXPORT_VERSION_3) {
@ -1123,6 +1124,7 @@ static int dtls_export_load(WOLFSSL* ssl, const byte* exp, word32 len, byte ver)
}
#endif
#else
idx++;
idx++;
idx++;
if (ver > DTLS_EXPORT_VERSION_3) {

View File

@ -1343,7 +1343,7 @@ enum Misc {
DTLS_EXPORT_PRO = 165,/* wolfSSL protocol for serialized session */
DTLS_EXPORT_STATE_PRO = 166,/* wolfSSL protocol for serialized state */
DTLS_EXPORT_VERSION = 4, /* wolfSSL version for serialized session */
DTLS_EXPORT_OPT_SZ = 60, /* amount of bytes used from Options */
DTLS_EXPORT_OPT_SZ = 61, /* amount of bytes used from Options */
DTLS_EXPORT_VERSION_3 = 3, /* wolfSSL version before TLS 1.3 addition */
DTLS_EXPORT_OPT_SZ_3 = 59, /* amount of bytes used from Options */
DTLS_EXPORT_KEY_SZ = 325 + (DTLS_SEQ_SZ * 2),