Explorar el Código

Examples: Force encryption to be used with the client_encryption example

Julius Pfrommer hace 6 años
padre
commit
afec3480a6
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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);