-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
342: Update libsodium to 1.0.18 r=dnaq a=kurnevsky Alignment patch is no longer needed with this update. Co-authored-by: Evgeny Kurnevsky <[email protected]>
- Loading branch information
Showing
16 changed files
with
163 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
# call this script manually to regen bindings from a new version of libsodium | ||
# make sure that you have up-to-date bindgen (at least 0.48.0 to avoid problems with alignments) | ||
|
||
# a whitelist regex to generate entities | ||
REGEX="(SODIUM|sodium|crypto|randombytes)_.*" | ||
|
||
bindgen PATH_TO/libsodium-1.0.17/src/libsodium/include/sodium.h -o sodium_bindings.rs \ | ||
bindgen PATH_TO/libsodium-1.0.18/src/libsodium/include/sodium.h -o sodium_bindings.rs \ | ||
--ctypes-prefix=libc --use-core \ | ||
--generate=functions,types,vars \ | ||
--whitelist-function=$REGEX \ | ||
--whitelist-type=$REGEX \ | ||
--whitelist-var=$REGEX | ||
|
||
# bindgen fails to compute the alignment in some cases: | ||
# - the alignment of crypto_onetimeauth_poly1305_state should be 16 | ||
# see https://github.com/jedisct1/libsodium/blob/1.0.17/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h#L19 | ||
# - the alignment of crypto_generichash_blake2b_state should be 64 | ||
# see https://github.com/jedisct1/libsodium/blob/1.0.17/src/libsodium/include/sodium/crypto_generichash_blake2b.h#L23 | ||
# the patch below fixes this | ||
git apply alignment_fix.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters