337 Commits
Author SHA1 Message Date
Mark Giraud 81003a3419 Fix: #3263 Padding is now calculated with the local key size during decryption. 2019-12-11 22:04:24 +01:00
Stefan Profanter a06a792fa8 fix(server): Correctly initialize application description discovery urls for custom hostname
fixes #3048
2019-08-30 21:27:48 +02:00
Stefan Profanter 2aa85fd9d7 fix: Fix clang compiler warnings on windows (found by azure build) 2019-08-30 15:48:44 +02:00
Stefan Profanter 7d6bb77e33 fix: Security policy check for empty private key to improve error message 2019-08-30 07:26:44 +02:00
Stefan Profanter 960e39fa69 fix: Improve error output for securityContext error 2019-08-30 07:26:44 +02:00
inspektor-scherlein 13fa838d54 Server: Two new callbacks to UA_GlobalNodeLifecycle
1. generateChildNodeId: Used to define NodeIds for automatically generated nodes during recursive node instantiation
2. createOptionalChild: Used to define whether an optional child should be created during recursive node instantiation
2019-08-24 15:02:43 +02:00
Julius Pfrommer 6f79ec6e8f Server: Reload folders with certificates during runtime 2019-08-08 09:59:15 +02:00
Julius Pfrommer c043775cd0 PKI: Correctly free the issuer list 2019-08-08 09:59:15 +02:00
Jayanth Velusamy 17fd93b2a0 CTT: Add DiscoveryUrl in ApplicationDescription of Server Endpoint
Signed-off-by: Jayanth Velusamy <jayanth.v@kalycito.com>
2019-08-08 07:10:24 +02:00
Julius Pfrommer caa20e1c4f Server: Add a configurable delay to the server shutdown
In order to notify clients about an imminent shutdown.
2019-08-01 08:04:29 +02:00
Jayanth Velusamy 328b63cf36 [CTT] Multiple fixes
Signed-off-by: Jayanth Velusamy <jayanth.v@kalycito.com>
2019-07-25 14:51:06 +02:00
Asish Ganesh 21e32dd997 [TASK] Check if a trusted certificate has a CRL file
- If there is no CRL file available for the corresponding parent
   certificate then return status code
   UA_STATUSCODE_BADCERTIFICATEREVOCATIONUNKNOWN
 - This resolves 042.js and 043.js test case in Security Certificate
   Validation Conformance Unit

Change-Id: I9fda40356d7d271b3f6ffeefb31b7cda569ee873
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-07-05 14:10:17 +02:00
Asish Ganesh d31a8126f2 [TASK] Check if a not trusted certificate has a CRL file
- Add functionality to identify the topmost parent certificate
   of a remoteCertificate
 - Check if any CRL file in the revocationList corresponds to
   the parent certificate
 - If there is no CRL file available for the corresponding parent
   certificate then return status code
   UA_STATUSCODE_BADCERTIFICATEISSUERREVOCATIONUNKNOWN
 - This resolves 002.js test case in Security Certificate
   Validation Conformance Unit

Change-Id: I1ac966973535042938add068c152796d65ee3b6e
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-07-05 14:10:17 +02:00
Asish Ganesh 436f29b03a [TASK] Pass issuer list separately
- At present issuer list is passed in trust list
 - Add functionality to pass the issuer list separately
 - Handle condition where a client is connected using
   an (trusted) issued certificate of a CA that is not
   trusted but available
 - This resolves test case number 044.js and 045.js in
   Security Certificate Validation to pass simultaneously
 - usage : ./server_ctt <server-certificate.der> <private-key.der>
           [--trustlist <tl1.ctl> <tl2.ctl> ... ]
           [--issuerlist <il1.der> <il2.der> ... ]
           [--revocationlist <rv1.crl> <rv2.crl> ...]

Change-Id: I4a25af9f4c2b771da9492fafb534f72dcc6fc17d
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-07-05 14:10:17 +02:00
Sten Grüner 1de8b24ac0 First attempt of mDNS interface selection (#2856)
fixes #2774
2019-07-02 17:16:02 +02:00
Julius Pfrommer 85c4d53b1c Config: Configure the UserTokenPolicy; Warn if password is unencrypted 2019-06-23 19:39:57 +02:00
Jonas Green 5d375771aa Security: Added support for server to decrypt passwords
The password is decrypted by the server implementation before calling
the access control plugin.
2019-06-23 19:39:57 +02:00
Julius Pfrommer 4a372387b5 Types: Pull UA_NodeId_order out from the Nodestore plugin
The method will be used in several places from now on.
2019-06-06 02:32:09 +02:00
Asish Ganesh 573f0f0852 [FIX] Connect using trusted client certificate
- At present if trusted client certificate having key
   encrypted with sha2-4096 is passed the response
   received is BadCertificateUseNotAllowed
 - According to CTT (Test case 052.js in Security
   Certificate Validation) the expected result is Good
 - Fixed the same by changing the max key length value

Change-Id: Ida9b0fad90ef82b3578e8edee61c43b0653223c3
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-05-26 10:19:52 +02:00
Stefan Profanter 6fe8453249 Untabify
Used command:
`find . \( -name '*.c' -o -name '*.h' \) -not \( -path "./deps/*" -prune \) ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;`
2019-05-25 09:09:46 +02:00
Asish Ganesh d85d929592 [FIX] Security certificate validation for CA certificate
- Check if the certificate used to establish connection is
   CA or User certificate
 - This fix resolves Security/Security Certificate Validation/029.js

Change-Id: I9e7d1e3ba43c13e4eec830368da4a94b0ce7aaf7
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-05-23 11:11:57 +02:00
Jojakim Stahl 4160545e0a Add functions to allow for more specific server configurations 2019-05-10 10:34:21 +02:00
Stefan Profanter 47388c9f2e Check for NULL config 2019-05-08 09:07:38 +02:00
Stefan Profanter 004d7d23af Stack: Avoid NULL-dereference
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14425

Credit to oss-fuzz
2019-05-07 07:26:56 +02:00
Stefan Profanter d31ae132ad Stack: Avoid double free/heap use after free
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14567

Credit to oss-fuzz
2019-05-07 07:05:31 +02:00
Stefan Profanter f2a151bc01 Stack: Refactor server config to separated discovery and mDNS settings 2019-05-06 18:05:09 +02:00
Stefan Profanter d874c0fff7 Stack: Check for NULL config 2019-05-02 14:04:44 +02:00
Asish Ganesh 3f29659d2b [FIX] Add security level value for corresponding message security mode
- Currently security level value not initialized corresponding to
   the message security mode
 - In CTT, "Security Certificate Validation" test cases gets skipped
   since security level value is zero for all security modes
 - So modified the security level value corresponding to the message
   security mode

Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-04-27 16:58:03 +02:00
Julius Pfrommer fd08d012d9 Server: Initialize the config in the server 2019-04-23 00:41:32 +02:00
Julius Pfrommer 522804cafc Server: Move the nodestore from the config to the server
Custom implementations of the nodestore require the library to be
rebuild.
2019-04-23 00:41:32 +02:00
Stefan Profanter f19a6a1839 Stack: Correct include for architecture related headers
Fixes #2646
2019-04-18 08:01:45 +02:00
Julius Pfrommer dd8bfbd094 Config: Cosmetic improvements and NULL checks 2019-04-14 00:33:44 +02:00
Jose Cabral 03a617d827 Unify memory allocation calls 2019-04-05 12:28:31 +00:00
Mark Giraud d070a2ff51 Clean up implementation specific behavior and some other code smells 2019-03-22 19:33:15 +00:00
Stefan Profanter ecee9f241e CMake: Correct installation if public headers 2019-03-21 20:16:31 +01:00
Stefan Profanter 63f3653ff1 Additional header cleanup and consistent name of ns generated files 2019-03-21 20:16:31 +01:00
Julius Pfrommer c9c818868f Move header files to a more unix-like structure
This commit drops the 'ua_' prefix and changes the public includes
to the form `#include <open62541/server.h>` instead of the old
`#include <ua_server.h>`
2019-03-21 20:16:31 +01:00
Jonas Green db5dc3d570 Added possibility to disable retransmission queue of sessions
The Micro Embedded UA profile allow devices to not support the
retransmission queue implemented by the session when DataChange
Subscriptions are supported. Previously there has been no possibility
to disable this queue. Disabling this queue can save some memory on
a resource constrained device.

Change-Id: I4e324b41f85bffdd0e640fb173f82c121a2044b5
2019-03-20 09:54:31 +01:00
Jannis Voelker 88980e971f Always include security policies in the amalgamated source file
This allows enabling or disabling security at build time when
the amalgamated distribution is used.
2019-03-19 13:29:31 +01:00
Julius Pfrommer 168e92ae20 Client: Set the default ApplicationURI in the config (same as the certificate default) 2019-03-18 16:37:20 +01:00
Julius Pfrommer 989a081a34 SecurityPolicy: Pull out common code to a separate compilation unit 2019-03-18 16:37:20 +01:00
Julius Pfrommer c9610d83ff SecurityPolicies: Add Basic256 SecurityPolicy 2019-03-18 16:37:20 +01:00
Julius Pfrommer 6c7cc0ab6d SecurityPolicy: Expose reusable methods across SecurityPolicy plugins 2019-03-18 16:37:20 +01:00
Stefan Profanter f295562a11 Untabify
Used command:
`find . \( -name '*.c' -o -name '*.h' \) -not \( -path "./deps/*" -prune \) ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;`
2019-03-14 16:44:34 +01:00
Stefan Profanter 7722d7d234 Stack: Fix null-dereference READ
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13573

Credit to oss-fuzz
2019-03-11 16:15:33 +01:00
Mark Giraud b4d0141e69 Fix #2544 2019-03-10 23:01:14 +01:00
Stefan Profanter b07583145f Stack: Check for out-of-memory while creating server config
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11646

Credit to oss-fuzz
2019-03-06 18:19:36 +01:00
Patrick Gansterer 3866e0c07a Use constant time memcmp to verify signatures to mitigate timing attacks 2019-03-02 08:30:00 +01:00
Jose Cabral d41ef4408c Simplify default client connection setting 2019-02-25 20:25:09 +01:00
Mark Giraud ea5b8177eb Fix pubsub ethernet 2019-02-21 23:46:34 +01:00