Election-Tech-Initiative / electionguard-cpp

A C++ implementation of ElectionGuard specification focused on encryption components.
https://www.electionguard.vote/
MIT License
23 stars 26 forks source link

🐞 Supporting null values from C# #310

Closed SteveMaier-IRT closed 2 years ago

SteveMaier-IRT commented 2 years ago

Is there an existing issue for this?

Current Behavior

In the candidate and party classes, the more expansive version of the constructors are being used and it includes fields that are fairly optional in many cases. For these, if the .net string that is passed in is equal to null, then that gets passed down to the C++ code and it tried to use it. This will throw an exception in the C++ code and not continue.

Expected Behavior

Null string values in the candidate and party constructors should be allowed for things such as the imageUri, logouri, color, etc.

Steps To Reproduce

No response

Environment

- OS:

Anything else?

No response