Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fortanix/rust-mbedtls
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 47f638e2ec40f4a857faa97c98b8153d7124ca9c
Choose a base ref
..
head repository: fortanix/rust-mbedtls
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 875d785fe9a826cfeb971b9acd00bdfc581fc222
Choose a head ref
Showing with 5 additions and 11 deletions.
  1. +1 −1 mbedtls-sys/Cargo.toml
  2. +0 −2 mbedtls-sys/build/config.rs
  3. +4 −3 mbedtls/Cargo.toml
  4. +0 −5 mbedtls/src/pk/mod.rs
2 changes: 1 addition & 1 deletion mbedtls-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ quote = "1.0.21"
# * strstr/strlen/strncpy/strncmp/strcmp/snprintf
# * memmove/memcpy/memcmp/memset
# * rand/printf (used only for self tests. optionally use custom_printf)
default = ["std", "debug", "threading", "time", "aesni", "padlock", "custom_has_support"]
default = ["std", "debug", "threading", "time", "aesni", "padlock"]
std = ["debug"] # deprecated automatic enabling of debug, can be removed on major version bump
debug = []
custom_printf = []
2 changes: 0 additions & 2 deletions mbedtls-sys/build/config.rs
Original file line number Diff line number Diff line change
@@ -287,7 +287,6 @@ const DEFAULT_DEFINES: &'static [CDefine] = &[
("MBEDTLS_ENTROPY_C", Undefined),
("MBEDTLS_ERROR_C", Defined),
("MBEDTLS_GCM_C", Defined),
("MBEDTLS_HAVEGE_C", Undefined),
("MBEDTLS_HKDF_C", Defined),
("MBEDTLS_HMAC_DRBG_C", Defined),
("MBEDTLS_NIST_KW_C", Defined),
@@ -305,7 +304,6 @@ const DEFAULT_DEFINES: &'static [CDefine] = &[
("MBEDTLS_PK_PARSE_C", Defined),
("MBEDTLS_PK_WRITE_C", Defined),
("MBEDTLS_PKCS5_C", Defined),
("MBEDTLS_PKCS11_C", Undefined),
("MBEDTLS_PKCS12_C", Defined),
("MBEDTLS_PLATFORM_C", Undefined),
("MBEDTLS_POLY1305_C", Defined),
7 changes: 4 additions & 3 deletions mbedtls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ core_io = { version = "0.1", features = ["collections"], optional = true }
spin = { version = "0.9.4", default-features = false, optional = true }
serde = { version = "1.0.7", default-features = false, features = ["alloc"] }
serde_derive = "1.0.7"
byteorder = "1.0.0"
byteorder = { version = "1.0.0", default-features = false }
yasna = { version = "0.5", optional = true, features = ["num-bigint", "bit-vec"] }
num-bigint = { version = "0.4", optional = true }
bit-vec = { version = "0.6", optional = true }
@@ -54,12 +54,13 @@ cc = "1.0"

[features]
# Features are documented in the README
default = ["std", "time", "padlock"]
default = ["std", "aesni", "time", "padlock"]
std = ["byteorder/std", "mbedtls-sys-auto/std", "serde/std", "yasna"]
debug = ["mbedtls-sys-auto/debug"]
no_std_deps = ["core_io", "spin", "serde/alloc"]
force_aesni_support = ["mbedtls-sys-auto/custom_has_support", "mbedtls-sys-auto/aes_alt"]
force_aesni_support = ["mbedtls-sys-auto/custom_has_support", "mbedtls-sys-auto/aes_alt", "aesni"]
rdrand = []
aesni = ["mbedtls-sys-auto/aesni"]
time = ["mbedtls-sys-auto/time"]
padlock = ["mbedtls-sys-auto/padlock"]
dsa = ["std", "yasna", "num-bigint", "bit-vec"]
5 changes: 0 additions & 5 deletions mbedtls/src/pk/mod.rs
Original file line number Diff line number Diff line change
@@ -38,9 +38,6 @@ pub use crate::ecp::EcGroup;

pub use dhparam::Dhm;

// SHA-256("Fortanix")[:4]
const CUSTOM_PK_TYPE: pk_type_t = 0x8b205408 as pk_type_t;

const RAW_RSA_DECRYPT : i32 = 1040451858;

define!(
@@ -56,7 +53,6 @@ define!(
RsaAlt = PK_RSA_ALT,
RsassaPss = PK_RSASSA_PSS,
Opaque = PK_OPAQUE,
Custom = CUSTOM_PK_TYPE,
}
);

@@ -71,7 +67,6 @@ impl From<pk_type_t> for Type {
PK_RSA_ALT => Type::RsaAlt,
PK_RSASSA_PSS => Type::RsassaPss,
PK_OPAQUE => Type::Opaque,
CUSTOM_PK_TYPE => Type::Custom,
_ => panic!("Invalid PK type"),
}
}