-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
326: Introduce separate features for pki and tls functionalities of mbedtls r=Taowyoo a=s-arash To statically guarantee that unwanted capabilities of this crate are not used (e.g., a client could only require the crypto functionality of this crate and not its ssl capabilities), this PR introduces two features: `x509` and `ssl`. `x509` enables the pki functionality of the crate and `ssl` enables its tls/ssl capabilities. Co-authored-by: Arash Sahebolamri <[email protected]>
- Loading branch information
Showing
9 changed files
with
67 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.cargo | ||
target/ | ||
venv/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
[package] | ||
name = "mbedtls" | ||
version = "0.9.3" | ||
# We jumped from v0.9 to v0.12 because v0.10 and v0.11 were based on mbedtls 3.X, which | ||
# we decided not to support. | ||
version = "0.12.0" | ||
authors = ["Jethro Beekman <[email protected]>"] | ||
build = "build.rs" | ||
edition = "2018" | ||
|
@@ -60,6 +62,10 @@ cc = "1.0" | |
|
||
[features] | ||
# Features are documented in the README | ||
|
||
x509 = [] | ||
ssl = ["x509"] | ||
|
||
default = ["std", "aesni", "time", "padlock"] | ||
std = ["byteorder/std", "mbedtls-sys-auto/std", "serde/std", "yasna", "mbedtls-platform-support/std"] | ||
debug = ["mbedtls-sys-auto/debug"] | ||
|
@@ -72,46 +78,45 @@ zlib = ["mbedtls-sys-auto/zlib"] | |
time = ["mbedtls-platform-support/time"] | ||
padlock = ["mbedtls-sys-auto/padlock"] | ||
dsa = ["std", "yasna", "num-bigint", "bit-vec"] | ||
pkcs12 = ["std", "yasna"] | ||
pkcs12 = ["std", "yasna", "x509"] | ||
pkcs12_rc2 = ["pkcs12", "rc2", "cbc"] | ||
legacy_protocols = ["mbedtls-sys-auto/legacy_protocols"] | ||
legacy_protocols = ["mbedtls-sys-auto/legacy_protocols", "ssl"] | ||
async = ["std", "tokio","tokio/net","tokio/io-util", "tokio/macros"] | ||
async-rt = ["async", "tokio/rt", "tokio/sync", "tokio/rt-multi-thread"] | ||
|
||
[[example]] | ||
name = "client" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[example]] | ||
name = "client_dtls" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[example]] | ||
name = "client_psk" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[example]] | ||
name = "server" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[test]] | ||
name = "client_server" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[test]] | ||
name = "ssl_conf_ca_cb" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[test]] | ||
name = "ssl_conf_verify" | ||
required-features = ["std"] | ||
required-features = ["std", "ssl"] | ||
|
||
[[test]] | ||
name = "hyper" | ||
required-features = ["std"] | ||
|
||
required-features = ["std", "ssl"] | ||
|
||
[[test]] | ||
name = "async_session" | ||
path = "tests/async_session.rs" | ||
required-features = ["async-rt"] | ||
required-features = ["async-rt", "ssl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters