Skip to content

Commit

Permalink
refactor(examples): Remove misleading comments - revocation lists are…
Browse files Browse the repository at this point in the history
… supported
  • Loading branch information
jpfr committed Oct 22, 2024
1 parent 66b7f42 commit a5465c9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ int main(int argc, char* argv[]) {
UA_ByteString certificate = loadFile(argv[2]);
UA_ByteString privateKey = loadFile(argv[3]);

/* Load the trustList. Load revocationList is not supported now */
/* Load the trustList */
size_t trustListSize = 0;
if(argc > MIN_ARGS)
trustListSize = (size_t)argc-MIN_ARGS;
UA_STACKARRAY(UA_ByteString, trustList, trustListSize+1);
for(size_t trustListCount = 0; trustListCount < trustListSize; trustListCount++)
trustList[trustListCount] = loadFile(argv[trustListCount+4]);

/* Revocation lists are supported, but not used for the example here */
UA_ByteString *revocationList = NULL;
size_t revocationListSize = 0;

Expand Down
3 changes: 1 addition & 2 deletions examples/ci_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,10 @@ int main(int argc, char* argv[]) {
size_t issuerListSize = 0;
UA_ByteString *issuerList = NULL;

/* Loading of a revocation list currently unsupported */
/* Revocation lists are supported, but not used for the example here */
UA_ByteString *revocationList = NULL;
size_t revocationListSize = 0;


retval = UA_ServerConfig_setDefaultWithSecurityPolicies(config, port,
&certificate, &privateKey,
trustList, trustListSize,
Expand Down
3 changes: 2 additions & 1 deletion examples/encryption/client_encryption.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ int main(int argc, char* argv[]) {
UA_ByteString certificate = loadFile(argv[2]);
UA_ByteString privateKey = loadFile(argv[3]);

/* Load the trustList. Load revocationList is not supported now */
/* Load the trustlist */
size_t trustListSize = 0;
if(argc > MIN_ARGS)
trustListSize = (size_t)argc-MIN_ARGS;
UA_STACKARRAY(UA_ByteString, trustList, trustListSize+1);
for(size_t trustListCount = 0; trustListCount < trustListSize; trustListCount++)
trustList[trustListCount] = loadFile(argv[trustListCount+4]);

/* Revocation lists are supported, but not used for the example here */
UA_ByteString *revocationList = NULL;
size_t revocationListSize = 0;

Expand Down
5 changes: 3 additions & 2 deletions examples/encryption/client_encryption_tpm_keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,15 @@ int main(int argc, char* argv[]) {
certificate.data = certificate_out_data->data;
certificate.length = certificate_out_data->length;

/* Load the trustList. Load revocationList is not supported now */
/* Load the trust list */
size_t trustListSize = 0;
if(argc > MIN_ARGS)
trustListSize = (size_t)argc-MIN_ARGS;
UA_STACKARRAY(UA_ByteString, trustList, trustListSize+1);
for(size_t trustListCount = 0; trustListCount < trustListSize; trustListCount++)
trustList[trustListCount] = loadFile(argv[trustListCount+7]);

/* Revocation lists are supported, but not used for the example here */
UA_ByteString *revocationList = NULL;
size_t revocationListSize = 0;

Expand Down Expand Up @@ -432,4 +433,4 @@ int main(int argc, char* argv[]) {
UA_Variant_clear(&value);
UA_Client_delete(client);
return retval == UA_STATUSCODE_GOOD ? EXIT_SUCCESS : EXIT_FAILURE;
}
}
2 changes: 1 addition & 1 deletion examples/encryption/server_encryption.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) {
size_t issuerListSize = 0;
UA_ByteString *issuerList = NULL;

/* Loading of a revocation list currently unsupported */
/* Revocation lists are supported, but not used for the example here */
UA_ByteString *revocationList = NULL;
size_t revocationListSize = 0;

Expand Down
2 changes: 1 addition & 1 deletion examples/encryption/server_encryption_tpm_keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ int main(int argc, char* argv[]) {
size_t issuerListSize = 0;
UA_ByteString *issuerList = NULL;

/* Loading of a revocation list currently unsupported */
/* Revocation lists are supported, but not used for the example here */
UA_ByteString *revocationList = NULL;
size_t revocationListSize = 0;

Expand Down

0 comments on commit a5465c9

Please sign in to comment.