Skip to contentSkip to conversation

TLS Warning: no data channel send key available

Openvpn-devel Gert Doering 1 participant 1 message Jan 22, 2016 4 messages not in the archive

lore
Share & tools
lore
#4 lore raw
In reply to a message not in the archive

Hi,

copying in the -devel list, as I see some portability patch coming...

Quoted 4 lines · Jan Just Keijser

crypto_adjust_frame_parameters: Adjusting frame parameters for crypto by zu bytes

"by zu bytes" ?!?!?!? Can you try it without compression?

sounds like someone used %zu in printf() and the C library in question doesn't understand that...

crypto.c: msg(D_MTU_DEBUG, "%s: Adjusting frame parameters for crypto by %zu bytes",

we used that in two places

crypto.c:  msg(D_MTU_DEBUG, "%s: Adjusting frame parameters for crypto by %zu bytes",
ssl_polarssl.c:      openvpn_snprintf (s2, sizeof (s2), ", %zu bit key", pk_get_size(&cert->pk));

... stackoverflow claims this is the right thing to do for a size_t

http://stackoverflow.com/questions/15610053/correct-printf-format-specifier-for-size-t-zu-or-iu
http://stackoverflow.com/questions/2524611/how-can-one-print-a-size-t-variable-portably-using-the-printf-family

... but that this is C99 and Visual Studio 2010 does not support it - so maybe it's not so much the "Visual Studio" bits but the C runtime on Windows - thus, this code misprints in the windows binary...

Someone else should test that :-) - and then we might want to convert the line in question to use %u and add an (unsigned int) cast.

(I seem to remember having discussions with Syzzer about %zu, and I did recommend to do the casting back then already - but that was a different part of the code)

As far as the original issue goes: that is just an informational message and not printing this should be totally harmless.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...