Skip to content

Commit

Permalink
Different symbols prefix for FIPS (aws#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth authored Feb 10, 2023
1 parent 5b3539e commit 3990d32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings/rust/aws-lc-fips-sys-template/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn get_platform_output_path() -> PathBuf {
const VERSION: &str = env!("CARGO_PKG_VERSION");

fn prefix_string() -> String {
format!("aws_lc_{}", VERSION.to_string().replace('.', "_"))
format!("aws_lc_fips_{}", VERSION.to_string().replace('.', "_"))
}

fn test_perl_command() -> bool {
Expand Down
2 changes: 1 addition & 1 deletion bindings/rust/generate/generate-fips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mkdir -p "${TMP_DIR}"
determine_generate_version

# Crate preparation.
if [[ ! -r "${SYMBOLS_FILE}" ]] || [[! -d "${AWS_LC_FIPS_DIR}" ]]; then
if [[ ! -r "${SYMBOLS_FILE}" || ! -d "${AWS_LC_FIPS_DIR}" ]]; then
# Symbols file must be consistent with AWS-LC source directory
rm -f "${SYMBOLS_FILE}"
rm -rf "${AWS_LC_FIPS_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion bindings/rust/generate/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ mkdir -p "${TMP_DIR}"
determine_generate_version

# Crate preparation.
if [[ ! -r "${SYMBOLS_FILE}" ]] || [[! -d "${AWS_LC_SRC_DIR}" ]]; then
if [[ ! -r "${SYMBOLS_FILE}" || ! -d "${AWS_LC_SRC_DIR}" ]]; then
# Symbols file must be consistent with AWS-LC source directory
rm -f "${SYMBOLS_FILE}"
rm -rf "${AWS_LC_SRC_DIR}"
Expand Down
6 changes: 6 additions & 0 deletions tests/ci/docker_images/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ $ sudo yum install -y qemu-system-aarch64 qemu-system-x86 qemu-user-binfmt
$ docker buildx create --name=container --driver=docker-container --use
$ docker run --privileged --rm tonistiigi/binfmt --install all
```

This may periodically need to be reset:
```
$ docker run --privileged --rm tonistiigi/binfmt --uninstall arm64,arm,riscv64,mips64le,s390x,ppc64le,mips64
$ docker run --privileged --rm tonistiigi/binfmt --install all
```

0 comments on commit 3990d32

Please sign in to comment.