Commit Graph

23 Commits

Author SHA1 Message Date
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
Julius Pfrommer fd08d012d9 Server: Initialize the config in the server 2019-04-23 00:41:32 +02: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
Julius Pfrommer afec3480a6 Examples: Force encryption to be used with the client_encryption example 2019-03-18 16:37:20 +01:00
Frank Meerkoetter 1648fb8aaa Use EXIT_SUCCESS/FAILURE for the examples
Make use of EXIT_SUCCESS and EXIT_FAILURE from stdlib.h.
The previous approach of returning a value from UA_StatusCode
was often broken as an exit code can (portably) only be between 0 and 125.
2019-02-09 09:34:46 +01:00
Julius Pfrommer f85607bc77 Examples: Force SignAndEncrypt for the client encryption example 2019-01-30 18:45:42 +01:00
Julius Pfrommer bcaa6695c0 Client: Store SecurityPolicies in the client config; Refactor connection logic 2019-01-30 18:45:42 +01:00
Julius Pfrommer b4c9fc37eb Client: Initialize client config inside the client structure
Temporarily disable encyrption
2019-01-30 18:45:42 +01:00
Frank Meerkoetter defe399445 Remove comments - I felt to be misleading
UA_ByteStrings aren't refcounted. The call to UA_ByteString_delete()
surely frees the memory. It does not derefence a string.
2019-01-21 10:02:07 +01:00
Stefan Profanter d715db1057 Stack: Use non-amalgamated headers in all the examples
For consistency we recommend using non-amalgamation install, thus the
examples should also use the non-amalgamated headers.
2018-12-17 22:40:07 +01:00
Julius Pfrommer eb9409b435 Examples: Use _clear instead of _deleteMembers for the examples 2018-12-09 19:40:02 +01:00
Jose Cabral 1605455a74 Fixes #1925 and clean examples 2018-07-25 08:17:51 +02:00
Sharavanan A R 6d7f08b641 [FIX] Trust list verification for secure client application
- Update UA_ByteString_allocBuffer() to UA_STACKARRAY() in the files
   examples/encryption/client_basic128rsa15.c and examples/encryption/
   client_basic256sha256.c.
 - Handle return value for remote certificate verification in
   ua_client.c file.
 - Update create_self-signed.py to generate CA certificate in .der
   format.

Change-Id: I6e84694c99c561d237ecbafb63b957d19c2e74c9
Signed-off-by: Sharavanan A R <sharavanan.ar@kalycito.com>
2018-04-16 10:44:33 +02:00
StalderT f144f0eabc fix securityPolicyUri selection (#1713)
* fix example selecting the correct endPoint

* fix ua_client_connect to use the correct policyUri

* fix load certificate order
2018-04-06 11:41:53 +02:00
StalderT 0702cc9bc2 unify include common.h 2018-04-05 12:51:14 +02:00
Mark 3b7d4d426d Add common.h to cmake project 2018-04-04 10:27:55 +02:00
StalderT da64add5c0 client basic 256sha256 / server sample / tests / various fixes (#1691)
* client basic 256sha256 / tests / various fixes

* fix server basic256sha256

* remove duplicated loadFile

* Fix fuzzing by making backup of message buffer

* Disable sonarcloud on PRs
2018-03-29 19:15:20 +02:00
Sharavanan A R 9093197f88 [FEATURE] Secure client implementation using basic128rsa15 policy
- The file examples/encryption/client_basic128rsa15.c provides a
   secure communication between client and server by using
   basic128rsa15 security policy.
 - The secure client-server communication is implemented
   based on the OPC UA specification Part 4, setion 6.
 - Line number 176 in file src/client/ua_client.c is commented as
   UA_SecureChannel_deleteMembers already done in
   UA_client_disconnect function.
 - Load revocation list is not supported in this commit.

Change-Id: I9aa06dce6ac000c290accc57f1147a919ec74f1e
Signed-off-by: Sharavanan A R <sharavanan.ar@kalycito.com>
2018-03-24 18:44:54 +01:00
Julius Pfrommer 46979d3b87 replace alloca with variable-length arrays and alloca as fallback 2018-03-16 15:33:02 +01:00
Mark Giraud 2110c8892e Fix windows script and warning (#1558) 2018-01-30 15:43:46 +01:00
StalderT dedff4d9d6 fix loadFile when alloc error (#1525)
* fix loadFile when alloc error

* fix loadFile when alloc error (basic128rsa15)
2018-01-20 01:26:01 +01:00
Infinity95 adf793b2ef Implement SecurityPolicy#Basic128Rsa15 with mbedTLS
seed rng correctly, don't use md_internal.h

move sha1 message digest into policy context

less casting in methods
2018-01-17 15:05:00 +01:00