Browse Source

Examples: Force encryption to be used with the client_encryption example

Julius Pfrommer 5 years ago
parent
commit
afec3480a6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      examples/encryption/client_encryption.c

+ 1 - 0
examples/encryption/client_encryption.c

@@ -41,6 +41,7 @@ int main(int argc, char* argv[]) {
 
     UA_Client *client = UA_Client_new();
     UA_ClientConfig *cc = UA_Client_getConfig(client);
+    cc->securityMode = UA_MESSAGESECURITYMODE_SIGNANDENCRYPT;
     UA_ClientConfig_setDefaultEncryption(cc, certificate, privateKey,
                                          trustList, trustListSize,
                                          revocationList, revocationListSize);