Skip to content

Commit 3f2becf

Browse files
authored
Update uniffi to 0.30 (#965)
* Update uniffi to 0.30.0 * Fix object name casing issue
1 parent f3f1f70 commit 3f2becf

File tree

4 files changed

+26
-35
lines changed

4 files changed

+26
-35
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ tokio-stream = "0.1.17"
7272
toml = "0.9"
7373
trybuild = "1.0"
7474
unic-langid = "0.9"
75-
uniffi = "0.29.4"
75+
uniffi = "0.30.0"
7676
url = "2.5"
7777
uuid = "1.18"
7878
x509-cert = "0.3.0-pre.0"

native/swift/Sources/wordpress-api/SafeRequestExecutor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public final class WpRequestExecutor: SafeRequestExecutor {
254254
)
255255
}
256256

257-
private func getPeerCertificateChain(_ error: Error) -> [SSLCertificateInfo]? {
257+
private func getPeerCertificateChain(_ error: Error) -> [SslCertificateInfo]? {
258258
let nserror = error as NSError
259259
let info = nserror.userInfo
260260

wp_api/src/ssl.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ use crate::date::WpGmtDateTime;
1212
//
1313
// If this returns `None`, we weren't able to parse the certificate
1414
#[uniffi::export]
15-
pub fn parse_certificate(data: &[u8]) -> Option<Arc<SSLCertificateInfo>> {
15+
pub fn parse_certificate(data: &[u8]) -> Option<Arc<SslCertificateInfo>> {
1616
let certificate = Certificate::from_der(data).ok()?;
1717
let certificate: &x509_cert::certificate::TbsCertificateInner = certificate.tbs_certificate();
1818

1919
Some(
20-
SSLCertificateInfo {
20+
SslCertificateInfo {
2121
valid_at: certificate.validity().not_before.into(),
2222
expires_at: certificate.validity().not_after.into(),
2323
common_name: extract_data_as_string(certificate.subject().common_name())?,
@@ -55,7 +55,7 @@ fn extract_alternative_names(cert: &x509_cert::certificate::TbsCertificateInner)
5555

5656
#[derive(Debug, PartialEq, Eq, Hash, uniffi::Object)]
5757
#[uniffi::export(Eq, Hash)]
58-
pub struct SSLCertificateInfo {
58+
pub struct SslCertificateInfo {
5959
/// The domain this certificate is valid for (or the signer's name, if this is an intermediate or root certificate)
6060
pub common_name: String,
6161
/// Other domains this certificate is valid for
@@ -69,7 +69,7 @@ pub struct SSLCertificateInfo {
6969
}
7070

7171
#[uniffi::export]
72-
impl SSLCertificateInfo {
72+
impl SslCertificateInfo {
7373
fn common_name(&self) -> String {
7474
self.common_name.clone()
7575
}

0 commit comments

Comments
 (0)