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

Add FFI API botan_cipher_requires_entire_message() #3969

Conversation

reneme
Copy link
Collaborator

@reneme reneme commented Apr 4, 2024

... as it says on the box.

@randombit One question: Should this be added to the python wrapper? I'm unsure, given that the python module just collects whatever shared object it finds. What happens, if it get a hold of an older library version whose FFI didn't provide this method. What's our contract here?

@reneme reneme added the enhancement Enhancement or new feature label Apr 4, 2024
@reneme reneme requested a review from randombit April 4, 2024 13:52
@reneme reneme self-assigned this Apr 4, 2024
@randombit
Copy link
Owner

Should this be added to the python wrapper? I'm unsure, given that the python module just collects whatever shared object it finds. What happens, if it get a hold of an older library version whose FFI didn't provide this method. What's our contract here?

The Python wrapper checks that botan_ffi_supports_api accepts the version it is hardcoded with, matching the date code of BOTAN_HAS_FFI.

Since this adds a new FFI interface we should

  • Update the version code in ffi/info.txt
  • Update botan_ffi_supports_api
  • Update botan3.py to use the new version
  • Add the FFI decl to botan3.py ideally also with a native Python call

We failed to do this correctly in 3.3.0 which added an FFI interface. I'll update the docs about this topic since they do not address these issues at all.

@reneme
Copy link
Collaborator Author

reneme commented Apr 4, 2024

Updated accordingly. I took the liberty to also add ideal_update_granularity and make is_authenticated a wrapper around botan_cipher_is_authenticated.

@reneme reneme force-pushed the feature/ffi_cipher_requires_entire_message branch from bf2bc76 to 98834c9 Compare April 4, 2024 19:21
Copy link
Owner

@randombit randombit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks!

@coveralls
Copy link

coveralls commented Apr 5, 2024

Coverage Status

coverage: 92.082% (+0.002%) from 92.08%
when pulling 98834c9 on Rohde-Schwarz:feature/ffi_cipher_requires_entire_message
into b059347 on randombit:master.

@reneme reneme merged commit 218678c into randombit:master Apr 5, 2024
43 checks passed
@reneme reneme deleted the feature/ffi_cipher_requires_entire_message branch April 5, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants