Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Taowyoo committed Nov 4, 2022
1 parent 87c3ea9 commit 875d785
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mbedtls-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
2 changes: 0 additions & 2 deletions mbedtls-sys/build/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
7 changes: 4 additions & 3 deletions mbedtls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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"]
Expand Down
5 changes: 0 additions & 5 deletions mbedtls/src/pk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand All @@ -56,7 +53,6 @@ define!(
RsaAlt = PK_RSA_ALT,
RsassaPss = PK_RSASSA_PSS,
Opaque = PK_OPAQUE,
Custom = CUSTOM_PK_TYPE,
}
);

Expand All @@ -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"),
}
}
Expand Down

0 comments on commit 875d785

Please sign in to comment.