How do I configure RTI Connext DDS to use the DTLS transport without WAN?

The simplest way to have RTI Connext DDS send encrypted UDP packets is to use the DTLS Transport plugin (also known as the Secure Transport), which comes with RTI Secure WAN Transport, but does not actually require WAN. In the Connext DDS 5.1.0 Core Libraries and Utilities User's Manual, Sections 24.4 and 25.4 discuss how to generate certificate files using OpenSSL and configure Connext DDS to use the Secure Transport. The shipped helloWorldWAN examples show how to configure RTI Secure WAN Transport to use DTLS. From the examples and documentation, you can figure out how to configure a non-WAN DDS application to use DTLS, but here is the XML configuration for your convenience:

      <!-- Add IPv4 addresses of other peers in new elements. -->
        <!-- Setting this property has no effect if linking statically and setting create_function_ptr. --> 
        <value>nddstransporttls</value> <!-- Must be this value if linking dynamically. -->
      <element> <!-- Only needed if linking dynamically. -->
        <value>cacert.pem</value> <!-- Use the same file for different Domain Participants. -->
        <value>peer1.pem</value> <!-- Use different files for different Domain Participants. -->

If linking statically, instead of setting create_function in XML, you must set create_function_ptr in code, as in this C example:

#include "transport_tls/transport_tls_plugin.h"




char create_function_ptr[17];
sprintf(create_function_ptr, "%p", NDDS_Transport_DTLS_create);



Hi.  I am trying to link this statically with my own custom transport.  It works fine if I make a dynamic library.  But if I try to compile it in directly I get this problem.

I get the following error when I try to run though.

[D0000|CREATE Participant|D0000|ENABLE]DDS_DomainParticipantConfigurator_setup_custom_transports:!get transport plugin library from property. Check that your transport plugin prefix begins with "dds.transport."
[D0000|CREATE Participant|D0000|ENABLE]DDS_DomainParticipant_enableI:Automatic participant index failed to initialize. PLEASE VERIFY CONSISTENT TRANSPORT / DISCOVERY CONFIGURATION.
[D0000|CREATE Participant]DDS_DomainParticipantFactory_create_participant:ERROR: Failed to auto-enable entity
create_participant error

I am not specifying a library because there isn't one.  But if I specify a library, then it complains it can not find one.


Are you sure you're using create_function_ptr instead of create_function? See the bottom of this article.


Ah you read my problem exactly.  I pasted that line from my qos file and it was incorrect.  thank you.

Can I use DTLS transport with RTI DDS Micro 2.4.11?