Skip to content

Commit 19f46c2

Browse files
justsmthaws-lc-sys-bindings-generator
andauthored
Prepare aws-lc-sys v0.32.3 (#922)
* Bump version to v0.32.3 * Align w/ AWS-LC v1.62.0 * Handle ENABLE_SOURCE_MODIFICATION + DISABLE_CPU_JITTER_ENTROPY * Tests for jitter-entropy * Symbols from ubuntu-latest * Symbols from macos-14 * Symbols from aarch64-pc-windows-msvc * Symbols from x86_64-pc-windows-msvc * Symbols from macos-13 * Symbols for arm-unknown-linux-gnueabi * Symbols for aarch64-unknown-linux-gnu * Symbols for aarch64-unknown-linux-musl * Symbols for powerpc64le-unknown-linux-gnu * Symbols for i686-unknown-linux-gnu * Symbols for x86_64-unknown-linux-musl * Symbols for armv7-unknown-linux-gnueabihf * Symbols for powerpc-unknown-linux-gnu * Symbols from x86_64-pc-windows-gnu * Symbols from i686-pc-windows-msvc * Generated headers * Generated bindings from ubuntu-latest * Generated bindings from macos-14 * Generated bindings for i686-pc-windows-msvc * Generated bindings for x86_64-pc-windows-gnu * Generated bindings for aarch64-unknown-linux-musl * Generated bindings for x86_64-pc-windows-msvc * Generated bindings for i686-unknown-linux-gnu * Generated bindings for aarch64-linux-android * Generated bindings for aarch64-pc-windows-msvc * Generated bindings for aarch64-unknown-linux-gnu * Generated bindings for x86_64-unknown-linux-musl * Generated bindings for riscv64gc-unknown-linux-gnu * Generated bindings from macos-13 * Collected source files from ubuntu-latest * Collected source files from macos-14 * Collected source files for x86_64-unknown-linux-musl * Collected source files for i686-unknown-linux-gnu * Collected source files from macos-13 * Collected source files for aarch64-unknown-linux-musl * Collected source files for aarch64-unknown-linux-gnu * Collected NASM files * Collected source files for riscv64gc-unknown-linux-gnu * Add CI jobs for jitter-entropy * Log the latency, but no sanity check on it --------- Co-authored-by: aws-lc-sys-bindings-generator <[email protected]>
1 parent 89210fc commit 19f46c2

File tree

100 files changed

+35026
-34892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+35026
-34892
lines changed

.github/workflows/analysis.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,67 @@ jobs:
292292
go-version: '>=1.18'
293293
- name: Run assert script
294294
run: ./scripts/tests/prefix_test.rs
295+
jitter-entropy:
296+
if: github.repository_owner == 'aws'
297+
name: Verify jitter-entropy is enabled
298+
runs-on: ubuntu-latest
299+
steps:
300+
- uses: actions/checkout@v3
301+
with:
302+
submodules: 'recursive'
303+
- uses: dtolnay/rust-toolchain@master
304+
id: toolchain
305+
with:
306+
toolchain: nightly
307+
- uses: actions/setup-go@v4
308+
with:
309+
go-version: '>=1.18'
310+
- name: Assert jitter-entropy available
311+
run: |
312+
if ./scripts/tests/assert_cpu_jitter_entropy.rs; then
313+
echo jitter-entropy enabled.
314+
exit 0
315+
else
316+
echo jitter-entropy not enabled, but should be.
317+
exit 1
318+
fi
319+
- name: Log the latency
320+
run: |
321+
LATENCY=$(./scripts/tests/first_random_byte_latency.rs)
322+
echo LATENCY: ${LATENCY}
323+
no-jitter-entropy:
324+
if: github.repository_owner == 'aws'
325+
name: Verify jitter-entropy is not enabled
326+
runs-on: ubuntu-latest
327+
env:
328+
AWS_LC_SYS_NO_JITTER_ENTROPY: 1
329+
steps:
330+
- uses: actions/checkout@v3
331+
with:
332+
submodules: 'recursive'
333+
- uses: dtolnay/rust-toolchain@master
334+
id: toolchain
335+
with:
336+
toolchain: nightly
337+
- uses: actions/setup-go@v4
338+
with:
339+
go-version: '>=1.18'
340+
- name: Assert jitter-entropy not available
341+
run: |
342+
if ./scripts/tests/assert_cpu_jitter_entropy.rs; then
343+
echo jitter-entropy enabled, but should not be.
344+
exit 1
345+
else
346+
echo jitter-entropy not enabled.
347+
exit 0
348+
fi
349+
- name: Verify latency is not present
350+
run: |
351+
LATENCY=$(./scripts/tests/first_random_byte_latency.rs)
352+
echo LATENCY: ${LATENCY}
353+
if [ "$LATENCY" -gt 1 ]; then
354+
echo LATENCY too high. Was jitter-entropy enabled?
355+
exit 1
356+
else
357+
exit 0
358+
fi

aws-lc-sys/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "aws-lc-sys"
33
description = "AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project."
4-
version = "0.32.2"
5-
links = "aws_lc_0_32_2"
4+
version = "0.32.3"
5+
links = "aws_lc_0_32_3"
66
authors = ["AWS-LC"]
77
edition = "2021"
88
repository = "https://github.com/aws/aws-lc-rs"
@@ -77,4 +77,4 @@ bindgen = { workspace = true, optional = true }
7777
bindgen.workspace = true
7878

7979
[package.metadata.aws-lc-sys]
80-
commit-hash = "8ca0b29b141bb8c7eae06ef324e2091d5648d819"
80+
commit-hash = "5a9df2190d9ecab090a62030f94a6ada6789a436"

aws-lc-sys/aws-lc

Submodule aws-lc updated 91 files

aws-lc-sys/builder/cc_builder.rs

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ mod x86_64_unknown_linux_gnu;
1515
mod x86_64_unknown_linux_musl;
1616

1717
use crate::{
18-
cargo_env, effective_target, emit_warning, env_var_to_bool, execute_command, get_crate_cflags,
19-
is_no_asm, optional_env_optional_crate_target, optional_env_target, out_dir, requested_c_std,
20-
set_env_for_target, target, target_arch, target_env, target_os, CStdRequested, OutputLibType,
18+
cargo_env, disable_jitter_entropy, effective_target, emit_warning, env_var_to_bool,
19+
execute_command, get_crate_cflags, is_no_asm, optional_env_optional_crate_target,
20+
optional_env_target, out_dir, requested_c_std, set_env_for_target, target, target_arch,
21+
target_env, target_os, CStdRequested, OutputLibType,
2122
};
2223
use std::cell::Cell;
2324
use std::collections::HashMap;
@@ -286,7 +287,9 @@ impl CcBuilder {
286287
build_options.push(BuildOption::flag("-pthread"));
287288
}
288289
}
289-
290+
if Some(true) == disable_jitter_entropy() {
291+
build_options.push(BuildOption::define("DISABLE_CPU_JITTER_ENTROPY", "1"));
292+
}
290293
self.add_includes(&mut build_options);
291294

292295
build_options
@@ -320,13 +323,16 @@ impl CcBuilder {
320323
.join("s2n-bignum-imported")
321324
.join("include"),
322325
));
323-
build_options.push(BuildOption::include(
324-
self.manifest_dir
325-
.join("aws-lc")
326-
.join("third_party")
327-
.join("jitterentropy")
328-
.join("jitterentropy-library"),
329-
));
326+
327+
if Some(true) != disable_jitter_entropy() {
328+
build_options.push(BuildOption::include(
329+
self.manifest_dir
330+
.join("aws-lc")
331+
.join("third_party")
332+
.join("jitterentropy")
333+
.join("jitterentropy-library"),
334+
));
335+
}
330336
}
331337

332338
pub fn create_builder(&self) -> cc::Build {
@@ -478,7 +484,10 @@ impl CcBuilder {
478484
s2n_bignum_builder.file(source_path);
479485
}
480486
} else if is_jitter_entropy {
481-
jitter_entropy_builder.file(source_path);
487+
// Only compile if not disabled.
488+
if Some(true) != disable_jitter_entropy() {
489+
jitter_entropy_builder.file(source_path);
490+
}
482491
} else {
483492
cc_build.file(source_path);
484493
}
@@ -488,9 +497,11 @@ impl CcBuilder {
488497
for object in s2n_bignum_object_files {
489498
cc_build.object(object);
490499
}
491-
let jitter_entropy_object_files = jitter_entropy_builder.compile_intermediates();
492-
for object in jitter_entropy_object_files {
493-
cc_build.object(object);
500+
if Some(true) != disable_jitter_entropy() {
501+
let jitter_entropy_object_files = jitter_entropy_builder.compile_intermediates();
502+
for object in jitter_entropy_object_files {
503+
cc_build.object(object);
504+
}
494505
}
495506
cc_build.file(PathBuf::from_str("rust_wrapper.c").unwrap());
496507
}

aws-lc-sys/builder/cc_builder/aarch64_apple_darwin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
3-
// Tue Sep 30 15:54:00 UTC 2025
3+
// Tue Oct 14 13:46:40 UTC 2025
44

55
use crate::cc_builder::Library;
66

aws-lc-sys/builder/cc_builder/aarch64_unknown_linux_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
3-
// Tue Sep 30 15:58:17 UTC 2025
3+
// Tue Oct 14 13:48:54 UTC 2025
44

55
use crate::cc_builder::Library;
66

aws-lc-sys/builder/cc_builder/aarch64_unknown_linux_musl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
3-
// Tue Sep 30 15:58:42 UTC 2025
3+
// Tue Oct 14 13:48:50 UTC 2025
44

55
use crate::cc_builder::Library;
66

aws-lc-sys/builder/cc_builder/i686_unknown_linux_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
3-
// Tue Sep 30 15:58:42 UTC 2025
3+
// Tue Oct 14 13:48:36 UTC 2025
44

55
use crate::cc_builder::Library;
66

aws-lc-sys/builder/cc_builder/riscv64gc_unknown_linux_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
3-
// Tue Sep 30 15:57:59 UTC 2025
3+
// Tue Oct 14 13:48:50 UTC 2025
44

55
use crate::cc_builder::Library;
66

aws-lc-sys/builder/cc_builder/x86_64_apple_darwin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
3-
// Tue Sep 30 15:55:28 UTC 2025
3+
// Tue Oct 14 13:48:14 UTC 2025
44

55
use crate::cc_builder::Library;
66

0 commit comments

Comments
 (0)