Skip to content

Commit c43f2cf

Browse files
committed
tvOS support
Updated security-framework to 2.10 Added cfg target os for tvOS
1 parent 50e2b02 commit c43f2cf

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rustls-platform-verifier/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ base64 = { version = "0.21", optional = true } # Only used when the `cert-loggin
3535
jni = { version = "0.19", default-features = false, optional = true } # Only used during doc generation
3636
once_cell = "1.9"
3737

38-
[target.'cfg(all(unix, not(target_os = "android"), not(target_os = "macos"), not(target_os = "ios")))'.dependencies]
38+
[target.'cfg(all(unix, not(target_os = "android"), not(target_os = "macos"), not(target_os = "ios"), not(target_os = "tvos")))'.dependencies]
3939
rustls-native-certs = "0.7"
4040
webpki = { package = "rustls-webpki", version = "0.102", features = ["ring", "alloc", "std"] }
4141

@@ -52,11 +52,11 @@ webpki-roots = "0.26"
5252
[target.'cfg(target_os = "freebsd")'.dev-dependencies]
5353
webpki-roots = "0.26"
5454

55-
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
55+
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))'.dependencies]
5656
core-foundation = "0.9"
5757
core-foundation-sys = "0.8"
58-
security-framework = { version = "2.6", features = ["OSX_10_14"] }
59-
security-framework-sys = { version = "2.4", features = ["OSX_10_14"] }
58+
security-framework = { version = "2.10", features = ["OSX_10_14"] }
59+
security-framework-sys = { version = "2.10", features = ["OSX_10_14"] }
6060

6161
[target.'cfg(windows)'.dependencies]
6262
winapi = { version = "0.3", features = ["wincrypt", "winerror"] }

rustls-platform-verifier/src/tests/verification_mock/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
//! any parts of the system outside of these tests. See the `#![cfg(...)]`
1414
//! immediately below to see which platforms run these tests.
1515
16-
#![cfg(all(any(windows, unix, target_os = "android"), not(target_os = "ios")))]
16+
#![cfg(all(
17+
any(windows, unix, target_os = "android"),
18+
not(target_os = "ios"),
19+
not(target_os = "tvos")
20+
))]
1721

1822
use super::TestCase;
1923
use crate::tests::{assert_cert_error_eq, ensure_global_state, verification_time};

rustls-platform-verifier/src/verification/mod.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
any(unix, target_arch = "wasm32"),
33
not(target_os = "android"),
44
not(target_os = "macos"),
5-
not(target_os = "ios")
5+
not(target_os = "ios"),
6+
not(target_os = "tvos")
67
))]
78
mod others;
89

910
#[cfg(all(
1011
any(unix, target_arch = "wasm32"),
1112
not(target_os = "android"),
1213
not(target_os = "macos"),
13-
not(target_os = "ios")
14+
not(target_os = "ios"),
15+
not(target_os = "tvos")
1416
))]
1517
pub use others::Verifier;
1618

17-
#[cfg(any(target_os = "macos", target_os = "ios"))]
19+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
1820
mod apple;
1921

20-
#[cfg(any(target_os = "macos", target_os = "ios"))]
22+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
2123
pub use apple::Verifier;
2224

2325
#[cfg(target_os = "android")]
@@ -61,7 +63,7 @@ fn log_server_cert(_end_entity: &rustls::pki_types::CertificateDer<'_>) {
6163

6264
// Unknown certificate error shorthand. Used when we need to construct an "Other" certificate
6365
// error with a platform specific error message.
64-
#[cfg(any(windows, target_os = "macos", target_os = "ios"))]
66+
#[cfg(any(windows, target_os = "macos", target_os = "ios", target_os = "tvos"))]
6567
fn invalid_certificate(reason: impl Into<String>) -> rustls::Error {
6668
rustls::Error::InvalidCertificate(rustls::CertificateError::Other(rustls::OtherError(
6769
std::sync::Arc::from(Box::from(reason.into())),

0 commit comments

Comments
 (0)