Skip to content

Commit

Permalink
Add SNI documentation (#404)
Browse files Browse the repository at this point in the history
* Add SNI documentation

Signed-off-by: jparisu <javierparis@eprosima.com>

* apply suggestions

Signed-off-by: jparisu <javierparis@eprosima.com>

Signed-off-by: jparisu <javierparis@eprosima.com>
  • Loading branch information
jparisu authored Sep 28, 2022
1 parent 35d88e1 commit a5a416a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ void dds_discovery_examples()

// Check XML static discovery from file
// The (file://) flag is optional.
std::string file = "file://static_Discovery.xml";
std::string file = "file://static_Discovery.xml";
DomainParticipantFactory* factory = DomainParticipantFactory::get_instance();
if (ReturnCode_t::RETCODE_OK != factory->check_xml_static_discovery(file))
{
Expand Down Expand Up @@ -4556,6 +4556,7 @@ void dds_transport_examples ()
tls_transport->tls_config.add_option(TLSOptions::DEFAULT_WORKAROUNDS);
tls_transport->tls_config.add_option(TLSOptions::SINGLE_DH_USE);
tls_transport->tls_config.add_option(TLSOptions::NO_SSLV2);
tls_transport->tls_config.server_name = "my_server.com";

// Link the Transport Layer to the Participant.
qos.transport().user_transports.push_back(tls_transport);
Expand Down
6 changes: 4 additions & 2 deletions code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
<option>SINGLE_DH_USE</option>
<option>NO_SSLV2</option>
</options>
<server_name>my_server.com</server_name>
</tls>
</transport_descriptor>
</transport_descriptors>
Expand Down Expand Up @@ -1158,6 +1159,7 @@
<verify_depth>55</verify_depth>
<default_verify_path>true</default_verify_path>
<handshake_role>SERVER</handshake_role>
<server_name>my_server.com</server_name>
</tls>
</transport_descriptor>
</transport_descriptors>
Expand Down Expand Up @@ -2010,7 +2012,7 @@
<maximum>3</maximum>
<increment>0</increment>
</matchedSubscribersAllocation>

<!-- reader_filters_allocation cannot be configured using XML (yet) -->
</data_writer>
<!--><-->
Expand Down Expand Up @@ -4045,7 +4047,7 @@
<maximum>3</maximum>
<increment>0</increment>
</matchedSubscribersAllocation>

<!-- reader_filters_allocation cannot be configured using XML (yet) -->
</data_writer>
<!--><-->
Expand Down
5 changes: 2 additions & 3 deletions docs/fastdds/transport/tcp/tls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ The following table describes the data members that are configurable on |TCPTran
* - |TCPTransportDescriptor::TLSConfig::server_name-api|
- ``string``
- ``""``
- [UNIMPLEMENTED] Server name or host name |br|
required in case Server Name Indication (SNI) |br|
is used.
- Server name or host name required in case |br|
Server Name Indication (SNI) is used.

.. note::

Expand Down
4 changes: 4 additions & 0 deletions docs/fastdds/xml_configuration/transports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ protocol are listed in the following table:
| | |br| connectors as | :cpp:concept:`CLIENT` | |
| | :cpp:concept:`CLIENT`. | | |
+---------------------------+-----------------------------------+----------------------------------------+-------------+
| ``<server_name>`` | server name or host name required | ``string`` | |
| | in case Server Name Indication | | |
| | (SNI) is used. | | |
+---------------------------+-----------------------------------+----------------------------------------+-------------+

An example of TLS protocol parameter configuration is shown below.

Expand Down

0 comments on commit a5a416a

Please sign in to comment.