浏览代码

Examples: Force encryption to be used with the client_encryption example

Julius Pfrommer 6 年之前
父节点
当前提交
afec3480a6
共有 1 个文件被更改,包括 1 次插入0 次删除
  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);