Commit graph

20 commits

Author SHA1 Message Date
Erik Boasson
812fa3e42f Deal with OpenSSL in a DLL on Windows
OpenSSL doesn't support using BIOs of the "fd" or "file" type when it is
built as a DLL and the executable didn't provide it with access to the
executable's CRT.  Requiring all applications that wish to use security
to worry about this "applink.c" thing is too onerous a requirement.

* Check for the existence of "applink.c" in the OpenSSL include
  directory, adding it to the security tests if it exists.  This way,
  all of OpenSSL can be used by the tests.

* Include it in the security core and built-in plugin tests.  This way,
  the test code can use the entirety of OpenSSL.

* In the authentication and access-control plugins, load X509 and
  private keys from files by first reading them into a "mem" type BIO,
  then reading them from that BIO.

* Take care not to call ddsrt_free on OpenSSL-allocated memory, either
  by calling OPENSSL_free, or by allocating the memory using
  ddsrt_malloc and letting OpenSSL fill that buffer.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-06-26 11:47:56 +02:00
Jeroen Koekkoek
b25f10ff33 Add ddsconf to generate md, rnc and xsd configuration documentation
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2020-06-25 14:10:11 +02:00
Erik Boasson
2da100a3c7 Merge remote-tracking branch 'upstream/master' into security 2020-05-11 15:05:46 +02:00
Erik Boasson
3c1b14e6cb Fix paths in documentation generation
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-05-08 10:09:11 +02:00
Dan Rose
17da91409a
Fix and simplify building docs and schemas (#441)
Fix and simplify building docs and schemas

1. Do an in-source build of derived schemas instead of building into build and checking that the files match.
2. Fix paths of installed docs, which were failing on me
3. Consolidate docs into same cmakelists that generates schema files
4. Trang is usually available as an executable, so find it with find_program.
5. Add doc dependencies to package.xml

Signed-off-by: Dan Rose <dan@digilabs.io>
2020-04-02 17:25:16 +02:00
Martin Bremmer
660d495746 Merge branch 'master' into merge6
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-12-13 12:59:37 +01:00
Erik Boasson
15179910d1 Write test fails to stdout/stderr even from ctest
Running tests while writing failed assertions to a text file means the
little information there is that causes test failures becomes pretty
much inaccessible on Travis.  Sending the output to stdout/stderr means
it can be trivially shown for failed tests using the --output-on-failure
option of ctest.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-19 15:16:52 +01:00
Erik Boasson
8cbd67c32b Report failure from CUnit only on test failure
Non-automated mode too should allow running a subset of the tests
without reporting failure.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-19 15:16:52 +01:00
Erik Boasson
e43bdb73c7 Fix install dir of CycloneDDSConfig.cmake (#321)
Installing Cyclone DDS for multiple architectures with the same
installation prefix gave problems because the CMake configuration files
ended up overwriting each other.  This brings it in line with the
recommended locations.  Thanks to @hansfn.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-18 14:21:10 +01:00
Dan Rose
bd858ea97f Add idlc to packaging and examples
Signed-off-by: Dan Rose <dan@digilabs.io>
2019-11-14 10:02:01 +01:00
Dan Rose
d12b926ff1 Move IDLC to its own install component
This allows you to express a dependency on it as `find_package(CycloneDDS REQUIRED COMPONENTS idlc)`
Also added a warning if CycloneDDS was built with IDLC but IDLC is not requested.

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-11-14 10:02:01 +01:00
Kurtulus Oksuztepe
2c1d3010d0 Builtin authentication plugin for DDS Security
Builtin authentication plugin of DDS Security implementation was added.
This plugin is the first implementation and it also contains the functions that are used initially in the secure communication sequence.

The builtin authentication plugin implements authentication using a trusted Certificate Authority (CA). It performs mutual authentication between discovered participants using the RSA or ECDSA Digital Signature Algorithms and establishes a shared secret using Diffie-Hellman (DH) or Elliptic Curve Diffie-Hellman (ECDH) Key Agreement Methods.

DDS Security core component is introduced with this commit. DDSI and other builtin plugins will also use the security core.

Like all builtin plugins, dds security authentication plugin is a shared library for providing dynamic library loading on runtime. So that, dds participants can use different plugin implementations with different configurations.

Authentication plugin uses ddsrt functions. ddsrt is not expected to be a shared library and statically adding ddsrt objects to authentication library produces linkage errors in windows. So, dynamically linking authentication plugin to ddc library is decided. Another decision should be taken for the platforms that are not supporting dynamic libraries later.

Signed-off-by: Kurtulus Oksuztepe <kurtulus.oksuztepe@adlinktech.com>
2019-10-30 11:41:00 +01:00
Scott K Logan
1cc6caff14 First check the CMake Package Registry for CUnit
This is useful when building CycloneDDS on platforms that provide CMake
configuration for CUnit outside of Conan.

If no configuration is found in the system CMake registry the module
continues as before.

Co-authored-by: Steven! Ragnarök <steven@nuclearsandwich.com>
Signed-off-by: Scott K Logan <logans@cottsay.net>
2019-10-22 22:33:10 +02:00
Dan Rose
960d4f7358 Use PROJECT_NAME instead of CMAKE_PROJECT_NAME
CMAKE_PROJECT_NAME refers to the top-level project name, not the most recent project. So any CMake project that pulls this in as a dependency was in for a nasty surprise.
https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_NAME.html

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-10-20 03:28:15 -07:00
Erik Boasson
13eb5f1d87 Disabling idlc means no IdlcGenerate
Setting BUILD_IDLC=OFF makes it possible to build Cyclone without
its (Java-based) IDL preprocessor.  In that case there is no
IdlcGenerate.cmake, and therefore the generated CycloneDDSConfig.cmake
must not try to include it either.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-08-26 14:07:46 +02:00
Jeroen Koekkoek
93addbbda0 Fix shadow warnings in CUnit tests
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-08-23 12:37:15 +02:00
Thijs Sassen
483f4d2b77 Fallback to zip installer for non Linux/Windows builds
Signed-off-by: Thijs Sassen <thijs.sassen@adlinktech.com>
2019-08-12 11:31:29 +02:00
Jeroen Koekkoek
0351963670 Fix version number parse bug in FindSphinx.cmake
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-08-02 13:06:43 +02:00
Jeroen Koekkoek
b916f0bfb7 Generate documentation using the FindSphinx.cmake module
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-07-31 20:12:11 +02:00
Erik Boasson
9cf4b97f1a Reorganize repository
* Move the project top-level CMakeLists.txt to the root of the project;
  this allows building Cyclone as part of ROS2 without any special
  tricks;

* Clean up the build options:

  ENABLE_SSL:    whether to check for and include OpenSSL support if a
                 library can be found (default = ON); this used to be
                 called DDSC_ENABLE_OPENSSL, the old name is deprecated
                 but still works
  BUILD_DOCS:    whether to build docs (default = OFF)
  BUILD_TESTING: whether to build test (default = OFF)

* Collect all documentation into top-level "docs" directory;

* Move the examples to the top-level directory;

* Remove the unused and somewhat misleading pseudo-default
  cyclonedds.xml;

* Remove unused cmake files

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-07-30 10:52:44 +02:00