=====================================================
RTI Connext Hello_security Example Application
=====================================================

Welcome to Connext.

To get started with Connext and the C# API, see the Getting Started
Guide at https://community.rti.com/static/documentation/connext-dds/
current/doc/manuals/connext_dds_professional/getting_started_guide/index.html

Setting up the Environment
--------------------------
Set the RTI_OPENSSLHOME environment variable to your OpenSSL 
installation_directory, which is
<Connext installation>\third_party\openssl-<version>.  Make sure your PATH
includes the directory %RTI_OPENSSLHOME%\<architecture>\release\bin
or wherever the libcrypto and libssl DLLs reside.

Compiling this Example
----------------------
To build this example, move to the folder of the dotnet version you 
have and execute:

  > dotnet build ./<DotNet Version>

Running this Example
--------------------
To run this example, type the following in two different command shells,
either on the same machine or on different machines:

  > dotnet run --project <.Net Version> --sub [arguments]
  > dotnet run --project <.Net Version> --pub [arguments]

Accepted Arguments
-------------------
This example is a modified version of an rtiddsgen generated HelloWorld application.
It has been modified to use security profiles.  

-d | --domain <domainID>    : Sets the DDS domain ID [default=0]
-c | --sampleCount <num>    : Sets number of samples to send/receive [default=(UNLIMITED)]
   | --profile <profilename>: Specify which profile from USER_QOS_PROFILES.xml use
  
This example uses ECDSA-ECDH by default. To run this example using DSA-DH or
RSA-ECDH, use --profile command-line argument DSA or RSA, respectively.

Troubleshooting this Example
============================
If you see the following error:

Cryptography_encrypt:error:0607B083:lib(6):func(123):reason(131)

you are likely linking against an older version of OpenSSL. You need version
1.0.1c or later.

If you see the following error:

Authentication_get_certificate:failed to verify certificate

your certificates have likely expired. You need to regenerate the peer{1,2,3}.pem 
or peer{1,2,3}dsa.pem files following the instructions in the html documentation
under DomainParticipantSecurityQosPolicy certificate.

If you see the following error:

OPENSSL_Uplink(10115000,08): no OPENSSL_Applink

you likely need to make sure your PATH includes the directory
%RTI_OPENSSLHOME%\<architecture>\release\bin, or wherever
the libcrypto and libssl DLLs reside.

For more information, please consult the "RTI Security Plugins Getting Started
Guide".
