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

Is there a way to make this code less error-prone for consumers? #14314

Closed
woody-apple opened this issue Jan 26, 2022 · 7 comments
Closed

Is there a way to make this code less error-prone for consumers? #14314

woody-apple opened this issue Jan 26, 2022 · 7 comments
Assignees
Labels

Comments

@woody-apple
Copy link
Contributor

The consumer doesn't need to know the exact OID value.


// TODO: Is there a way to make this code less error-prone for consumers?
// The consumer doesn't need to know the exact OID value.
noc_dn.AddAttribute(chip::ASN1::kOID_AttributeType_ChipFabricId, fabricId);
noc_dn.AddAttribute(chip::ASN1::kOID_AttributeType_ChipNodeId, nodeId);
// TODO: Add support for the CASE Authenticated Tags attributes
ChipDN icac_dn;


This issue was generated by todo-issue based on a TODO comment in 20c1f60. It's been assigned to @emargolis because they committed the code.
@andy31415
Copy link
Contributor

@emargolis - is this a blocker for V1? it sounds like just nicer API may be a refactor so a maintanability thing rather than release blocking.

@woody-apple
Copy link
Contributor Author

Agree, let's move that out.

@emargolis
Copy link
Contributor

This was partially addressed in #17190

There still TODO comment from @bzbarsky-apple that should be addressed:

So... This is fine as far as it goes, but the actual TODO was about seeing whether here was a way to make the "link up the NOC and ICA cert and RCA cert just right" code that's more or less duplicated across all the credential providers harder to mess up.

For example, maybe we should have a utility for "create an operational root cert" that takes the validity start, validity end, issuer id, fabric id, and key and does the setup of the DN, the listing of the DN twice in the X509CertRequestParams, etc. And then returns some piece of data that we can pass to the "create an ICA cert" or "create a NOC" bits that will automatically set the right "parent" DN, etc....

@stale
Copy link

stale bot commented Oct 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Oct 9, 2022
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Oct 10, 2022
@stale
Copy link

stale bot commented Apr 11, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Apr 11, 2023
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Apr 11, 2023
@stale
Copy link

stale bot commented Oct 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Oct 15, 2023
@bzbarsky-apple
Copy link
Contributor

This was fixed in #13737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants