[package]
edition = "2021"
rust-version = "1.88"
name = "spiffe-rustls"
version = "0.4.7"
authors = ["Max Lambrecht <maxlambrecht@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "SPIFFE-based mutual TLS integration for rustls"
documentation = "https://docs.rs/spiffe-rustls"
readme = "README.md"
keywords = [
"spiffe",
"spire",
"rustls",
"mtls",
"tls",
]
categories = [
"authentication",
"network-programming",
]
license = "Apache-2.0"
repository = "https://github.com/maxlambrecht/rust-spiffe"
[package.metadata.docs.rs]
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
aws-lc-rs = ["rustls/aws_lc_rs"]
default = ["ring"]
logging = [
"dep:log",
"spiffe/logging",
]
parking-lot = ["dep:parking_lot"]
ring = ["rustls/ring"]
tracing = [
"dep:tracing",
"spiffe/tracing",
]
[lib]
name = "spiffe_rustls"
path = "src/lib.rs"
[[example]]
name = "mtls_tcp_client"
path = "examples/mtls_tcp_client.rs"
[[example]]
name = "mtls_tcp_server"
path = "examples/mtls_tcp_server.rs"
[[test]]
name = "federation_mtls"
path = "tests/federation_mtls.rs"
[[test]]
name = "integration_mtls"
path = "tests/integration_mtls.rs"
[dependencies.log]
version = "0.4"
optional = true
[dependencies.oid-registry]
version = "0.8.1"
[dependencies.parking_lot]
version = "0.12"
optional = true
[dependencies.rustls]
version = "0.23"
features = ["std"]
default-features = false
[dependencies.spiffe]
version = "0.11"
features = ["x509-source"]
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt",
"sync",
]
default-features = false
[dependencies.tokio-util]
version = "0.7"
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.x509-parser]
version = "0.18"
[dev-dependencies.anyhow]
version = "1"
[dev-dependencies.env_logger]
version = "0.11"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"signal",
]
default-features = false
[dev-dependencies.tokio-rustls]
version = "0.26"
default-features = false
[lints.clippy]
all = "warn"
alloc_instead_of_core = "warn"
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
as_pointer_underscore = "warn"
as_ptr_cast_mut = "warn"
as_underscore = "warn"
assertions_on_result_states = "warn"
big_endian_bytes = "warn"
branches_sharing_code = "warn"
cargo = "warn"
cfg_not_test = "warn"
clear_with_drain = "warn"
clone_on_ref_ptr = "warn"
coerce_container_to_any = "warn"
collection_is_never_read = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
decimal_literal_representation = "warn"
default_union_representation = "warn"
deref_by_slicing = "warn"
derive_partial_eq_without_eq = "warn"
disallowed_script_idents = "warn"
doc_include_without_cfg = "warn"
doc_link_code = "warn"
else_if_without_else = "warn"
empty_drop = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
equatable_if_let = "warn"
error_impl_error = "warn"
exit = "warn"
expect_used = "warn"
fallible_impl_from = "warn"
field_scoped_visibility_modifiers = "warn"
filetype_is_file = "warn"
float_arithmetic = "warn"
float_cmp_const = "warn"
fn_to_numeric_cast_any = "warn"
future_not_send = "warn"
get_unwrap = "warn"
host_endian_bytes = "warn"
if_then_some_else_none = "warn"
imprecise_flops = "warn"
indexing_slicing = "warn"
infinite_loop = "warn"
inline_asm_x86_att_syntax = "warn"
inline_asm_x86_intel_syntax = "warn"
iter_on_empty_collections = "warn"
iter_on_single_items = "warn"
iter_with_drain = "warn"
large_include_file = "warn"
large_stack_frames = "warn"
let_underscore_must_use = "warn"
let_underscore_untyped = "warn"
literal_string_with_formatting_args = "warn"
little_endian_bytes = "warn"
lossy_float_literal = "warn"
map_err_ignore = "warn"
map_with_unused_argument_over_ranges = "warn"
mem_forget = "warn"
missing_asserts_for_indexing = "warn"
missing_const_for_fn = "warn"
mixed_read_write_in_expression = "warn"
modulo_arithmetic = "warn"
multiple_unsafe_ops_per_block = "warn"
mutex_atomic = "warn"
mutex_integer = "warn"
needless_collect = "warn"
needless_pass_by_ref_mut = "warn"
needless_raw_strings = "warn"
non_ascii_literal = "warn"
non_send_fields_in_send_ty = "warn"
non_zero_suggestions = "warn"
nonstandard_macro_braces = "warn"
or_fun_call = "warn"
panic = "warn"
panic_in_result_fn = "warn"
path_buf_push_overwrite = "warn"
pathbuf_init_then_push = "warn"
pedantic = "warn"
pointer_format = "warn"
precedence_bits = "warn"
print_stderr = "warn"
print_stdout = "warn"
pub_without_shorthand = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
read_zero_byte_vec = "warn"
redundant_clone = "warn"
redundant_type_annotations = "warn"
ref_patterns = "warn"
renamed_function_params = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_and_then = "warn"
self_named_module_files = "warn"
semicolon_inside_block = "warn"
separated_literal_suffix = "warn"
set_contains_or_insert = "warn"
significant_drop_tightening = "warn"
single_option_map = "warn"
string_add = "warn"
string_lit_as_bytes = "warn"
string_lit_chars_any = "warn"
string_slice = "warn"
suboptimal_flops = "warn"
suspicious_operation_groupings = "warn"
suspicious_xor_used_as_pow = "warn"
tests_outside_test_module = "warn"
todo = "warn"
too_long_first_doc_paragraph = "warn"
trailing_empty_array = "warn"
trait_duplication_in_bounds = "warn"
transmute_undefined_repr = "warn"
trivial_regex = "warn"
try_err = "warn"
tuple_array_conversions = "warn"
type_repetition_in_bounds = "warn"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
uninhabited_references = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unnecessary_struct_initialization = "warn"
unreachable = "warn"
unused_peekable = "warn"
unused_result_ok = "warn"
unused_rounding = "warn"
unused_trait_names = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
use_debug = "warn"
use_self = "warn"
useless_let_if_seq = "warn"
verbose_file_reads = "warn"
volatile_composites = "warn"
while_float = "warn"
[lints.clippy.must_use_candidate]
level = "allow"
priority = 1
[lints.rust]
absolute_paths_not_starting_with_crate = "warn"
ambiguous_negative_literals = "warn"
closure_returning_async_block = "warn"
deprecated_safe_2024 = "warn"
deref_into_dyn_supertrait = "warn"
edition_2024_expr_fragment_specifier = "warn"
elided_lifetimes_in_paths = "warn"
explicit_outlives_requirements = "warn"
ffi_unwind_calls = "warn"
if_let_rescope = "warn"
impl_trait_overcaptures = "warn"
impl_trait_redundant_captures = "warn"
keyword_idents = "warn"
keyword_idents_2018 = "warn"
keyword_idents_2024 = "warn"
let_underscore_drop = "warn"
linker_messages = "warn"
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
missing_unsafe_on_extern = "warn"
non_ascii_idents = "warn"
redundant_imports = "warn"
redundant_lifetimes = "warn"
rust_2021_incompatible_closure_captures = "warn"
rust_2021_incompatible_or_patterns = "warn"
rust_2021_prefixes_incompatible_syntax = "warn"
rust_2021_prelude_collisions = "warn"
rust_2024_guarded_string_incompatible_syntax = "warn"
rust_2024_incompatible_pat = "warn"
rust_2024_prelude_collisions = "warn"
single_use_lifetimes = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unit_bindings = "warn"
unnameable_types = "warn"
unreachable_pub = "warn"
unsafe_attr_outside_unsafe = "warn"
unsafe_code = "warn"
unsafe_op_in_unsafe_fn = "warn"
unstable_features = "warn"
unused_crate_dependencies = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"