Skip to content

Commit beda979

Browse files
committed
fix: Replace ring usage with aws lc rs for FIPS compliance
1 parent 0636128 commit beda979

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

launchdarkly-server-sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ futures = "0.3.12"
2525
lazy_static = "1.4.0"
2626
log = "0.4.14"
2727
lru = { version = "0.13.0", default-features = false }
28-
ring = "0.17.5"
2928
launchdarkly-server-sdk-evaluation = "2.0.0"
3029
serde = { version = "1.0.132", features = ["derive"] }
3130
serde_json = { version = "1.0.73", features = ["float_roundtrip"] }
@@ -39,6 +38,7 @@ hyper = { version = "0.14.19", features = ["client", "http1", "http2", "tcp"] }
3938
hyper-rustls = { version = "0.24.1" , optional = true}
4039
rand = "0.9"
4140
flate2 = { version = "1.0.35", optional = true }
41+
aws-lc-rs = "1.13.3"
4242

4343
[dev-dependencies]
4444
maplit = "1.0.1"

launchdarkly-server-sdk/src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ impl Client {
561561
/// For more information, see the Reference Guide:
562562
/// <https://docs.launchdarkly.com/sdk/features/secure-mode#rust>.
563563
pub fn secure_mode_hash(&self, context: &Context) -> String {
564-
let key = ring::hmac::Key::new(ring::hmac::HMAC_SHA256, self.sdk_key.as_bytes());
565-
let tag = ring::hmac::sign(&key, context.canonical_key().as_bytes());
564+
let key = aws_lc_rs::hmac::Key::new(aws_lc_rs::hmac::HMAC_SHA256, self.sdk_key.as_bytes());
565+
let tag = aws_lc_rs::hmac::sign(&key, context.canonical_key().as_bytes());
566566

567567
data_encoding::HEXLOWER.encode(tag.as_ref())
568568
}

0 commit comments

Comments
 (0)