# Copyright 2026-Present Datadog, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[package]
name = "rc-crypto"
version = "0.1.1"
edition = "2024"
license = "Apache-2.0"
description = "Crypto library for the RC X509 platform"
repository = "https://github.com/DataDog/libdd-rc"

[lints]
workspace = true

[dependencies]
aws-lc-rs = { version = "1", default-features = false, features = ["alloc"] }
bytes = "1"
thiserror = "2"
valuable = { version = "0.1", features = ["derive"] }
jiff = "0.2.24"

# NOTE: both of these dependencies currently enable non-FIPS crypto backends.
rcgen = { version = "0.14.7", default-features = false, features = ["pem", "x509-parser"] }
x509-parser = { version = "0.18" }
pem = "3"
smallvec = "1.15.1"
equivalent = "1"

[dev-dependencies]
assert_matches = "1.5.0"
criterion = "0.8"
hex = "0.4"
proptest = "1.11"
static_assertions = "1.1.0"
rc-x509-test-helpers = { path = "../rc-x509-test-helpers", version = "0.1.1" }

[features]
default = ["fips"]
fips = ["aws-lc-rs/fips", "rcgen/aws_lc_rs", "rcgen/fips", "x509-parser/verify-aws"]

# Flags specifically required for dd-source compatibility, with default=false.
dd-source = ["x509-parser/verify"]

[lib]
# Disable the stdlib benchmark harness and use Criterion exclusively.
bench = false

[[bench]]
name = "benches"
harness = false
