Server does not send out extensions not advertised by client
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index 5b35b94..9d50175 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -1270,6 +1270,7 @@
case TLS_EXT_SUPPORTED_POINT_FORMATS:
SSL_DEBUG_MSG( 3, ( "found supported point formats extension" ) );
+ ssl->handshake->cli_exts |= TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT;
ret = ssl_parse_supported_point_formats( ssl, ext + 4, ext_size );
if( ret != 0 )
@@ -1546,7 +1547,12 @@
unsigned char *p = buf;
((void) ssl);
- *olen = 0;
+ if( ( ssl->handshake->cli_exts &
+ TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT ) == 0 )
+ {
+ *olen = 0;
+ return;
+ }
SSL_DEBUG_MSG( 3, ( "server hello, supported_point_formats extension" ) );