Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve naming consistency in the C wrapper #10

Open
paulhowardarm opened this issue Apr 24, 2023 · 0 comments
Open

Improve naming consistency in the C wrapper #10

paulhowardarm opened this issue Apr 24, 2023 · 0 comments

Comments

@paulhowardarm
Copy link
Collaborator

Summary

The current state of the C wrapper is a bit mixed up with regards to naming conventions. Since C is not a namespaced language, it's important to use prefixes and use them consistently. We need to do a pass over the current C wrapper and make sure we have a consistent approach.

Details

We can debate exactly what should change to what, but here are some places where we probably need to make some kind of fix:

  • The members of the VeraisonResult enum probably should have a prefix, eg VeraisonOk rather than just Ok
  • The ChallengeResponseSession structure probably should have a prefix, and maybe its casing style is also not very C-like - can the cbindgen tool do on-the-fly renaming to better match the typical casing conventions of C interfaces?
  • The functions open_challenge_response_session, challenge_response, free_challenge_response_session all need a veraison_ prefix.
  • The challenge_response function arguably could do with a more active name, such as veraison_challenge_response_supply_evidence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant