diff --git a/src/internal.c b/src/internal.c index d5d56c36a..3fb3c5c98 100644 --- a/src/internal.c +++ b/src/internal.c @@ -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) { diff --git a/wolfssl/internal.h b/wolfssl/internal.h index 7a8a87765..bb8402bd5 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -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),