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

const-oid: provide shortest_by_oid lookups #1127

Closed

Conversation

baloo
Copy link
Member

@baloo baloo commented Jun 28, 2023

see #1121

@baloo baloo marked this pull request as draft June 28, 2023 02:41
@baloo
Copy link
Member Author

baloo commented Jun 28, 2023

Provided a couple fixups to make the dependency tree happy that looks like it works:


     Running tests/name.rs (target/debug/deps/name-2a144d2ccb8c9eae)

running 3 tests
test decode_rdn ... ok
test decode_name ... ok
test rdns_serde ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

That would require a const-oid 0.9.3 backport if we want to release that without too much hassle.

@tarcieri
Copy link
Member

@baloo I had something a little bit different in mind.

I was thinking of adding a method which returns an Iterator<Item = &'a str>, e.g. struct Names<'a>, which iterates over all of the names for a given OID. I'm not sure of a good name for it given the current naming scheme, but otherwise something like Database::find_names_for_oid.

If you have that iterator you can implement shortest_by_oid as a private function in x509-cert, although we could add it to const-oid if there are use cases outside of X.509.

@baloo baloo force-pushed the baloo/const-oid/shortest-by-oid branch from 323842a to 583130f Compare June 28, 2023 15:49
@tarcieri
Copy link
Member

@baloo can you split out the const-oid changes so we can merge them separately? I can take care of the backport

@baloo
Copy link
Member Author

baloo commented Jun 29, 2023

Yes, I'll try to do that tonight. And also update the comment !!

@baloo
Copy link
Member Author

baloo commented Jun 29, 2023

Closed in favor of #1129 and #1130

@baloo baloo closed this Jun 29, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants