diff --git a/tls/client-tls13.c b/tls/client-tls13.c index 74a92aa6..65dcfe6d 100644 --- a/tls/client-tls13.c +++ b/tls/client-tls13.c @@ -54,7 +54,7 @@ int Tls13SecretCallback(WOLFSSL* ssl, int id, const unsigned char* secret, size_t clientRandomSz; XFILE fp = stderr; if (ctx) { - fp = XFOPEN((const char*)ctx, "wb"); + fp = XFOPEN((const char*)ctx, "ab"); if (fp == XBADFILE) { return BAD_FUNC_ARG; } diff --git a/tls/server-tls13.c b/tls/server-tls13.c index 5d635199..c14310a3 100644 --- a/tls/server-tls13.c +++ b/tls/server-tls13.c @@ -55,7 +55,7 @@ int Tls13SecretCallback(WOLFSSL* ssl, int id, const unsigned char* secret, size_t clientRandomSz; XFILE fp = stderr; if (ctx) { - fp = XFOPEN((const char*)ctx, "wb"); + fp = XFOPEN((const char*)ctx, "ab"); if (fp == XBADFILE) { return BAD_FUNC_ARG; }