# This is the config file for `cargo-deny` used in CI

# This section is considered when running `cargo deny check licenses`
# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
default = "deny"
unlicensed = "deny"
copyleft = "deny"
allow-osi-fsf-free = "neither"
allow = [
    # See https://spdx.org/licenses/ for list of possible licenses
    # [possible values: any SPDX 3.11 short identifier (+ optional exception)].
    "Apache-2.0 WITH LLVM-exception",
    "Apache-2.0",
    "BSD-3-Clause",
    "ISC",
    "MIT",
    "MPL-2.0",
    "Unicode-DFS-2016",
    "Unicode-3.0",
]
confidence-threshold = 1.0
exceptions = [
    { allow = ["OpenSSL"], name = "ring", version = "*" },
    { allow = ["OpenSSL"], name = "aws-lc-sys", version = "*" },
    { allow = ["OpenSSL"], name = "aws-lc-fips-sys", version = "*" },
]

[[licenses.clarify]]
name = "webpki"
version = "*"
expression = "MIT AND ISC"
license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]

[[licenses.clarify]]
name = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]

[[licenses.clarify]]
name = "webpki"
expression = "ISC"
license-files = [
    { path = "LICENSE", hash = 0x001c7e6c },
]

[[licenses.clarify]]
name = "rustls-webpki"
expression = "ISC"
license-files = [
    { path = "LICENSE", hash = 0x001c7e6c },
]

# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
multiple-versions = "allow"
wildcards = "deny" # Don't allow wildcard dependencies
highlight = "all"
deny = []

# This section is considered when running `cargo deny check sources`.
# More documentation about the 'sources' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []
