diff --git a/Cargo.lock b/Cargo.lock index d647bf5ed..4b5ab5cb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4007,15 +4007,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.23" @@ -4351,9 +4342,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uniffi" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d968cb62160c11f2573e6be724ef8b1b18a277aededd17033f8a912d73e2b4" +checksum = "c866f627c3f04c3df068b68bb2d725492caaa539dd313e2a9d26bb85b1a32f4e" dependencies = [ "anyhow", "camino", @@ -4368,9 +4359,9 @@ dependencies = [ [[package]] name = "uniffi_bindgen" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b39ef1acbe1467d5d210f274fae344cb6f8766339330cb4c9688752899bf6b" +checksum = "7c8ca600167641ebe7c8ba9254af40492dda3397c528cc3b2f511bd23e8541a5" dependencies = [ "anyhow", "askama", @@ -4385,7 +4376,7 @@ dependencies = [ "serde", "tempfile", "textwrap", - "toml 0.5.11", + "toml 0.9.7", "uniffi_internal_macros", "uniffi_meta", "uniffi_pipeline", @@ -4394,9 +4385,9 @@ dependencies = [ [[package]] name = "uniffi_build" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6683e6b665423cddeacd89a3f97312cf400b2fb245a26f197adaf65c45d505b2" +checksum = "3e55c05228f4858bb258f651d21d743fcc1fe5a2ec20d3c0f9daefddb105ee4d" dependencies = [ "anyhow", "camino", @@ -4405,9 +4396,9 @@ dependencies = [ [[package]] name = "uniffi_core" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d990b553d6b9a7ee9c3ae71134674739913d52350b56152b0e613595bb5a6f" +checksum = "7e7a5a038ebffe8f4cf91416b154ef3c2468b18e828b7009e01b1b99938089f9" dependencies = [ "anyhow", "bytes", @@ -4417,9 +4408,9 @@ dependencies = [ [[package]] name = "uniffi_internal_macros" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f4f224becf14885c10e6e400b95cc4d1985738140cb194ccc2044563f8a56b" +checksum = "e3c2a6f93e7b73726e2015696ece25ca0ac5a5f1cf8d6a7ab5214dd0a01d2edf" dependencies = [ "anyhow", "indexmap", @@ -4430,9 +4421,9 @@ dependencies = [ [[package]] name = "uniffi_macros" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b481d385af334871d70904e6a5f129be7cd38c18fcf8dd8fd1f646b426a56d58" +checksum = "64c6309fc36c7992afc03bc0c5b059c656bccbef3f2a4bc362980017f8936141" dependencies = [ "camino", "fs-err", @@ -4441,15 +4432,15 @@ dependencies = [ "quote", "serde", "syn", - "toml 0.5.11", + "toml 0.9.7", "uniffi_meta", ] [[package]] name = "uniffi_meta" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f817868a3b171bb7bf259e882138d104deafde65684689b4694c846d322491" +checksum = "0a138823392dba19b0aa494872689f97d0ee157de5852e2bec157ce6de9cdc22" dependencies = [ "anyhow", "siphasher 0.3.11", @@ -4459,9 +4450,9 @@ dependencies = [ [[package]] name = "uniffi_pipeline" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b147e133ad7824e32426b90bc41fda584363563f2ba747f590eca1fd6fd14e6" +checksum = "8c27c4b515d25f8e53cc918e238c39a79c3144a40eaf2e51c4a7958973422c29" dependencies = [ "anyhow", "heck", @@ -4472,9 +4463,9 @@ dependencies = [ [[package]] name = "uniffi_udl" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caed654fb73da5abbc7a7e9c741532284532ba4762d6fe5071372df22a41730a" +checksum = "d0adacdd848aeed7af4f5af7d2f621d5e82531325d405e29463482becfdeafca" dependencies = [ "anyhow", "textwrap", diff --git a/Cargo.toml b/Cargo.toml index cb7e29151..86f8b7b20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,7 +72,7 @@ tokio-stream = "0.1.17" toml = "0.9" trybuild = "1.0" unic-langid = "0.9" -uniffi = "0.29.4" +uniffi = "0.30.0" url = "2.5" uuid = "1.18" x509-cert = "0.3.0-pre.0" diff --git a/native/swift/Sources/wordpress-api/SafeRequestExecutor.swift b/native/swift/Sources/wordpress-api/SafeRequestExecutor.swift index 0ab39589d..a52e79609 100644 --- a/native/swift/Sources/wordpress-api/SafeRequestExecutor.swift +++ b/native/swift/Sources/wordpress-api/SafeRequestExecutor.swift @@ -254,7 +254,7 @@ public final class WpRequestExecutor: SafeRequestExecutor { ) } - private func getPeerCertificateChain(_ error: Error) -> [SSLCertificateInfo]? { + private func getPeerCertificateChain(_ error: Error) -> [SslCertificateInfo]? { let nserror = error as NSError let info = nserror.userInfo diff --git a/wp_api/src/ssl.rs b/wp_api/src/ssl.rs index 8a6d90136..151462adf 100644 --- a/wp_api/src/ssl.rs +++ b/wp_api/src/ssl.rs @@ -12,12 +12,12 @@ use crate::date::WpGmtDateTime; // // If this returns `None`, we weren't able to parse the certificate #[uniffi::export] -pub fn parse_certificate(data: &[u8]) -> Option> { +pub fn parse_certificate(data: &[u8]) -> Option> { let certificate = Certificate::from_der(data).ok()?; let certificate: &x509_cert::certificate::TbsCertificateInner = certificate.tbs_certificate(); Some( - SSLCertificateInfo { + SslCertificateInfo { valid_at: certificate.validity().not_before.into(), expires_at: certificate.validity().not_after.into(), common_name: extract_data_as_string(certificate.subject().common_name())?, @@ -55,7 +55,7 @@ fn extract_alternative_names(cert: &x509_cert::certificate::TbsCertificateInner) #[derive(Debug, PartialEq, Eq, Hash, uniffi::Object)] #[uniffi::export(Eq, Hash)] -pub struct SSLCertificateInfo { +pub struct SslCertificateInfo { /// The domain this certificate is valid for (or the signer's name, if this is an intermediate or root certificate) pub common_name: String, /// Other domains this certificate is valid for @@ -69,7 +69,7 @@ pub struct SSLCertificateInfo { } #[uniffi::export] -impl SSLCertificateInfo { +impl SslCertificateInfo { fn common_name(&self) -> String { self.common_name.clone() }