Skip to content

Commit e678e0f

Browse files
authored
Merge pull request fortanix#658 from fortanix/mridul/mbedtls-0.13-update
Update to mbedtls v0.13.0
2 parents 9a39dab + d08a371 commit e678e0f

File tree

17 files changed

+167
-165
lines changed

17 files changed

+167
-165
lines changed

Cargo.lock

Lines changed: 131 additions & 130 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

em-app/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ b64-ct = "0.1.3"
1414
em-client = { version = "4.0.0", default-features = false, features = ["client"] }
1515
em-node-agent-client = "1.0.0"
1616
hyper = { version = "0.10", default-features = false }
17-
mbedtls = { version = "0.12", default-features = false, features = ["rdrand", "std", "ssl"] }
17+
mbedtls = { version = ">=0.12.0, <0.14.0", default-features = false, features = ["rdrand", "std", "ssl"] }
1818
pkix = ">=0.1.2, <0.3.0"
1919

2020
rustc-serialize = "0.3.24"
2121
sdkms = { version = "0.3", default-features = false }
22-
serde = "1.0.123"
22+
serde = "1.0"
2323
serde_bytes = "0.11"
24-
serde_derive = "1.0.123"
24+
serde_derive = "1.0"
2525
serde_json = "1.0"
2626
url = "1"
2727
uuid = { version = "0.6.3", features = ["v4", "serde"] }

em-app/examples/get-certificate/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ publish = false
88

99
[dependencies]
1010
em-app = { path = "../../" }
11-
mbedtls = { version = "0.12", default-features = false, features = ["std"] }
11+
mbedtls = { version = ">=0.12.0, <0.14.0", default-features = false, features = ["std"] }
1212
serde_json = "1.0"

examples/tls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ publish = false
77

88
[dependencies]
99
chrono = "0.4"
10-
mbedtls = { version = "0.12", default-features = false, features = ["std"] }
10+
mbedtls = { version = ">=0.12.0, <0.14.0", default-features = false, features = ["std"] }

fortanix-vme/aws-nitro-enclaves/nitro-attestation-verify/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99
chrono = "0.4"
1010
serde_cbor = "0.11"
1111
aws-nitro-enclaves-cose = { version = "0.5.0", default-features = false }
12-
mbedtls = { version = "0.12", features = ["rdrand", "std", "time", "ssl"], default-features = false, optional = true }
12+
mbedtls = { version = "0.13.1", features = ["rdrand", "std", "time", "ssl"], default-features = false, optional = true }
1313
num-bigint = "0.4"
1414
serde = { version = "1.0", features = ["derive"] }
1515
serde_bytes = "0.11"

fortanix-vme/aws-nitro-enclaves/nitro-attestation-verify/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ mod tests {
328328
// Not After : Sep 9 13:19:20 2021 GMT
329329
static ref PROPER_TOKEN : Vec<u8> = include_bytes!("../data/request_proper.bin").to_vec();
330330
static ref PROPER_VALIDITY: (DateTime<Utc>, DateTime<Utc>) = (Utc.with_ymd_and_hms(2021, 9, 9, 10, 19, 19).unwrap(), Utc.with_ymd_and_hms(2021, 9, 9, 13, 19, 21).unwrap());
331-
static ref NOT_VALID_YET_ERR: NitroError = NitroError::CertificateVerifyFailure("Certificate verify failure: X509CertVerifyFailed, The certificate validity starts in the future\n".to_string());
332-
static ref EXPIRED_ERR: NitroError = NitroError::CertificateVerifyFailure("Certificate verify failure: X509CertVerifyFailed, The certificate validity has expired\n".to_string());
331+
static ref NOT_VALID_YET_ERR: NitroError = NitroError::CertificateVerifyFailure("Certificate verify failure: HighLevel(X509CertVerifyFailed), The certificate validity starts in the future\n".to_string());
332+
static ref EXPIRED_ERR: NitroError = NitroError::CertificateVerifyFailure("Certificate verify failure: HighLevel(X509CertVerifyFailed), The certificate validity has expired\n".to_string());
333333
static ref TAMPERED_SIGNATURE : Vec<u8> = include_bytes!("../data/tampered_signature.bin").to_vec();
334334
static ref TAMPERED_CERTIFICATE : Vec<u8> = include_bytes!("../data/tampered_certificate.bin").to_vec();
335335
}

fortanix-vme/aws-nitro-enclaves/nitro-attestation-verify/src/mbedtls.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use aws_nitro_enclaves_cose::crypto::{Hash, MessageDigest, SignatureAlgorithm, SigningPublicKey};
77
use aws_nitro_enclaves_cose::error::CoseError;
88
use mbedtls::alloc::Box as MbedtlsBox;
9+
use mbedtls::error::{codes, Error as ErrMbed};
910
use mbedtls::hash::{self, Md};
1011
use mbedtls::pk::EcGroupId;
1112
use mbedtls::x509::Certificate;
@@ -97,7 +98,7 @@ impl SigningPublicKey for WrappedCert {
9798
// We'll throw error if signature verify does not work
9899
match pk.verify(*md, &digest, &sig) {
99100
Ok(_) => Ok(true),
100-
Err(mbedtls::Error::EcpVerifyFailed) => Ok(false),
101+
Err(ErrMbed::HighLevel(codes::EcpVerifyFailed)) => Ok(false),
101102
Err(e) => Err(CoseError::SignatureError(Box::new(e))),
102103
}
103104
}

intel-sgx/dcap-artifact-retrieval/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ backoff = "0.4.0"
2222
clap = { version = "2.23.3", optional = true }
2323
lazy_static = "1"
2424
lru-cache = "0.1.2"
25-
mbedtls = { version = "0.12.3", features = [
25+
mbedtls = { version = ">=0.12.0, <0.14.0", features = [
2626
"x509",
2727
"ssl",
2828
"std",
@@ -47,6 +47,6 @@ yasna = { version = "0.3", features = ["num-bigint", "bit-vec"] }
4747
pcs = { version = "0.7", path = "../pcs", features = ["verify"] }
4848

4949
[build-dependencies]
50-
mbedtls = { version = "0.12.3", features = ["ssl", "x509"] }
50+
mbedtls = { version = ">=0.12.0, <0.14.0", features = ["ssl", "x509"] }
5151
pkix = "0.2.0"
5252
serde_cbor = "0.11"

intel-sgx/dcap-ql/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ byteorder = "1.1.0" # Unlicense/MIT
4545
anyhow = "1.0" # MIT/Apache-2.0
4646
lazy_static = "1" # MIT/Apache-2.0
4747
libc = { version = "0.2", optional = true } # MIT/Apache-2.0
48-
mbedtls = { version = "0.12", default-features = false, features = ["std", "x509"], optional = true }
48+
mbedtls = { version = ">=0.12.0, <0.14.0", default-features = false, features = ["std", "x509"], optional = true }
4949
num = { version = "0.2", optional = true }
5050
num-derive = "0.2" # MIT/Apache-2.0
5151
num-traits = "0.2" # MIT/Apache-2.0
5252
serde = { version = "1.0.104", features = ["derive"], optional = true } # MIT/Apache-2.0
5353
yasna = { version = "0.3", features = ["num-bigint", "bit-vec"], optional = true }
5454

5555
[dev-dependencies]
56-
mbedtls = { version = "0.12" }
56+
mbedtls = { version = ">=0.12.0, <0.14.0" }
5757
report-test = { version = "0.5.0", path = "../report-test" }
5858
sgxs = { version = "0.8.0", path = "../sgxs" }
5959
serde = { version = "1.0.104", features = ["derive"] }

intel-sgx/fortanix-sgx-tools/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ serde_derive = "1.0.84" # MIT/Apache-2.0
3434
serde = "1.0.84" # MIT/Apache-2.0
3535
toml = "0.4.10" # MIT/Apache-2.0
3636
num_cpus = "1.9.0" # MIT/Apache-2.0
37-
libc = "0.2.48" # MIT/Apache-2.0
37+
libc = "0.2" # MIT/Apache-2.0
3838
nix = "0.13.0" # MIT

0 commit comments

Comments
 (0)