diff --git a/aws-lc-sys/Cargo.toml b/aws-lc-sys/Cargo.toml index 295d33d2931..d1e279c2b83 100644 --- a/aws-lc-sys/Cargo.toml +++ b/aws-lc-sys/Cargo.toml @@ -63,8 +63,5 @@ bindgen = { version = "0.68.1" } libc = "0.2" paste = "1.0.11" -[dev-dependencies] -openssl = { version = "0.10" } - [package.metadata.aws-lc-sys] commit-hash = "aa90e509f2e940916fbe9fdd469a4c90c51824f6" diff --git a/aws-lc-sys/tests/sanity-tests.rs b/aws-lc-sys/tests/sanity-tests.rs index adf36ecb5f3..ef96f8e6a72 100644 --- a/aws-lc-sys/tests/sanity-tests.rs +++ b/aws-lc-sys/tests/sanity-tests.rs @@ -1,30 +1,13 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 OR ISC -use std::mem::MaybeUninit; - -fn sha1_tester(input: &[u8]) -> [u8; 20] { - let mut hash = MaybeUninit::<[u8; 20]>::uninit(); - +#[test] +fn test_fips_mode() { unsafe { - aws_lc_sys::SHA1(input.as_ptr(), input.len(), hash.as_mut_ptr().cast()); - hash.assume_init() + assert_eq!(aws_lc_sys::FIPS_mode(), 0); } } -fn compare(result: &[u8], expected_result: &[u8]) { - println!("Comparing: {result:?} to {expected_result:?}"); - assert_eq!(result, expected_result); -} - -#[test] -fn sha1() { - let input1 = b"hello"; - let result1 = sha1_tester(input1); - let openssl_result1 = openssl::sha::sha1(input1); - compare(&result1, &openssl_result1); -} - #[test] fn error_checking() { unsafe {