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

Feature request: Vendored Botan3 #94

Closed
thewalker77 opened this issue Jun 12, 2023 · 3 comments
Closed

Feature request: Vendored Botan3 #94

thewalker77 opened this issue Jun 12, 2023 · 3 comments

Comments

@thewalker77
Copy link

I have two ideas in mind:
A) have both botan2 and botan3 submodules, but that does not really scale and I kinda don't like it.
B) clone the repository at runtime and checkout the right tag in the build script (system commands or libgit ... etc).

I prefer B, because then we can also checkout to different branch, revision number, tag and have that as configurable feature flag ... etc. But in this particular case, it might be a bit hard to make sure that all the possible configurations compile.

For me I just need Botan3, but with no proper justification in mind aside for it being the newest, latest and shinest.

P.S I can might be able to offer helping hand if you have a preference on A) or B) as for the time being I just modified local submodule to point to master and hoped for the best.

@randombit
Copy link
Owner

I already updated botan-src in git to point to 3.0.0 - from the perspective of this Rust library there is not much reason to ever prefer using Botan2, so I don't see any need to vendor it specifically. This hasn't been released yet, I think there are still some rough edges that I need to fix.

Something like (B) where the tag/revision that is checked out is under the control of the user is interesting. It would certainly reduce friction on updating the vendored version if all I had to do was update the default tag each time there was a new release.

no proper justification in mind aside for it being the newest, latest and shinest.

There are some specific reasons to prefer Botan3 in this context - there are additions to the C API which eliminate a problem that affected the earlier interfaces, where the Rust wrapper would try a potentially expensive operation (such as encrypting and serializing a private key), find out after everything was done that it had not allocated sufficient memory for the output, and then would be forced throw it away and retry. Also there are some additional functionality available such as SRP, forward error correction, post quantum key exchange, etc.

@thewalker77
Copy link
Author

Inkwell library does exactly option B https://docs.rs/crate/inkwell/latest/features

@randombit
Copy link
Owner

Vendored botan is now at latest and greatest 3.1.1, so I'm going to close this ticket. I do think the idea of allowing the user to specify a tag/revision/version has a lot of value but I'll track that in #102

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

2 participants